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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d8094a303b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2016-12-15 21:08:48 +01:00
parent 269ef77f2a
commit 25e65de35e
1 changed files with 4 additions and 2 deletions

View File

@ -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,