1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

avcodec/ffv1enc_template: Be a bit more verbose on error

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2025-03-09 23:38:29 +01:00
parent a8a83e06f9
commit 0b097ed9f1

View File

@@ -37,12 +37,12 @@ RENAME(encode_line)(FFV1Context *f, FFV1SliceContext *sc,
if (ac != AC_GOLOMB_RICE) { if (ac != AC_GOLOMB_RICE) {
if (c->bytestream_end - c->bytestream < w * 35) { if (c->bytestream_end - c->bytestream < w * 35) {
av_log(logctx, AV_LOG_ERROR, "encoded frame too large\n"); av_log(logctx, AV_LOG_ERROR, "encoded Range Coder frame too large\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
} else { } else {
if (put_bytes_left(&sc->pb, 0) < w * 4) { if (put_bytes_left(&sc->pb, 0) < w * 4) {
av_log(logctx, AV_LOG_ERROR, "encoded frame too large\n"); av_log(logctx, AV_LOG_ERROR, "encoded Golomb Rice frame too large\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
} }