There is no need to explicitly specify the buffer, as it is only ever passed to av_log, so av_err2str can be used.
Unified · Split
| @@ -313,11 +313,9 @@ static int64_t crypto_seek(URLContext *h, int64_t pos, int whence) · 312 unmodified lines | |||
| 313 | 313 | ||
| 314 | // if we did not get all the bytes | 314 | // if we did not get all the bytes |
| 315 | if (len != 0) { | 315 | if (len != 0) { |
| 316 | char errbuf[100] = "unknown error"; | ||
| 317 | av_strerror(res, errbuf, sizeof(errbuf)); | ||
| 318 | av_log(h, AV_LOG_ERROR, | 316 | av_log(h, AV_LOG_ERROR, |
| 319 | "Crypto: discard read did not get all the bytes (%d remain) - read returned (%d)-%s\n", | 317 | "Crypto: discard read did not get all the bytes (%d remain) - read returned (%d)-%s\n", |
| 320 | len, res, errbuf); | 318 | len, res, av_err2str(res)); |
| 321 | return AVERROR(EINVAL); | 319 | return AVERROR(EINVAL); |
| 322 | } | 320 | } |
| 323 | } | 321 | } |