summaryrefslogtreecommitdiff
path: root/libavcodec/vp3.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-12-15 21:08:48 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-03-03 17:17:53 +0100
commitd8094a303ba36344015a44d629bafc6d7094b4ac (patch)
treee08f3d6d2039bc205426d826cc8cbc9075d9e333 /libavcodec/vp3.c
parent13332504c98918447159da2a1a34e377dca360e2 (diff)
avcodec/vp3: Do not return random positive values but the buf size
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r--libavcodec/vp3.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index fa749be0b7..86e5852e32 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,