aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-12-15 21:08:48 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-17 20:35:19 +0200
commite11e2574c742d71d16d17742eac2006f0f269716 (patch)
tree76e180a920aacb0c5e176d0e220c34d28b482eb5
parent5740278de27ff9ff6d33de0936fa3d97001d2560 (diff)
downloadffmpeg-e11e2574c742d71d16d17742eac2006f0f269716.tar.gz
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>
-rw-r--r--libavcodec/vp3.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 5bbf47b52d..f392183918 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -2022,8 +2022,9 @@ static int vp3_decode_frame(AVCodecContext *avctx,
ret = vp3_decode_init(avctx);
if (ret < 0) {
vp3_decode_end(avctx);
+ return ret;
}
- return ret;
+ return buf_size;
} else if (type == 2) {
vp3_decode_end(avctx);
ret = theora_decode_tables(avctx, &gb);
@@ -2031,8 +2032,9 @@ static int vp3_decode_frame(AVCodecContext *avctx,
ret = vp3_decode_init(avctx);
if (ret < 0) {
vp3_decode_end(avctx);
+ return ret;
}
- return ret;
+ return buf_size;
}
av_log(avctx, AV_LOG_ERROR,