1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-04-24 17:12:34 +02:00

avcodec/vp3: Do not return random positive values but the buf size

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d8094a303ba36344015a44d629bafc6d7094b4ac)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2016-12-15 21:08:48 +01:00
parent b382722972
commit 94d1f07c3b

View File

@ -2020,16 +2020,18 @@ static int vp3_decode_frame(AVCodecContext *avctx,
ret = vp3_decode_init(avctx); ret = vp3_decode_init(avctx);
if (ret < 0) { if (ret < 0) {
vp3_decode_end(avctx); vp3_decode_end(avctx);
return ret;
} }
return ret; return buf_size;
} else if (type == 2) { } else if (type == 2) {
ret = theora_decode_tables(avctx, &gb); ret = theora_decode_tables(avctx, &gb);
if (ret >= 0) if (ret >= 0)
ret = vp3_decode_init(avctx); ret = vp3_decode_init(avctx);
if (ret < 0) { if (ret < 0) {
vp3_decode_end(avctx); vp3_decode_end(avctx);
return ret;
} }
return ret; return buf_size;
} }
av_log(avctx, AV_LOG_ERROR, av_log(avctx, AV_LOG_ERROR,