diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index b3aaf4e22d..d23ed375f6 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -2014,16 +2014,18 @@ 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) { ret = theora_decode_tables(avctx, &gb); if (ret >= 0) 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,