Hi, On Thu, Mar 1, 2012 at 5:48 PM, Alex Converse <[email protected]> wrote: > --- > libavcodec/rv10.c | 28 +++++++++++++++++++++------- > 1 files changed, 21 insertions(+), 7 deletions(-) > > diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c > index 5dd08e9..2b1a09d 100644 > --- a/libavcodec/rv10.c > +++ b/libavcodec/rv10.c > @@ -499,9 +499,10 @@ static int rv10_decode_packet(AVCodecContext *avctx, > const uint8_t *buf, int buf_size, int buf_size2) > { > MpegEncContext *s = avctx->priv_data; > - int mb_count, mb_pos, left, start_mb_x; > + int mb_count, mb_pos, left, start_mb_x, active_bits_size; > > - init_get_bits(&s->gb, buf, buf_size*8); > + active_bits_size = buf_size * 8; > + init_get_bits(&s->gb, buf, FFMAX(buf_size, buf_size2) * 8); > if(s->codec_id ==CODEC_ID_RV10) > mb_count = rv10_decode_picture_header(s); > else > @@ -584,13 +585,26 @@ static int rv10_decode_packet(AVCodecContext *avctx, > s->mv_type = MV_TYPE_16X16; > ret=ff_h263_decode_mb(s, s->block); > > - if (ret != SLICE_ERROR && s->gb.size_in_bits < > get_bits_count(&s->gb) && 8*buf_size2 >= get_bits_count(&s->gb)){ > - av_log(avctx, AV_LOG_DEBUG, "update size from %d to %d\n", > s->gb.size_in_bits, 8*buf_size2); > - s->gb.size_in_bits= 8*buf_size2; > + // Repeat the slice end check from ff_h263_decode_mb with our active > + // bitstream size > + if (ret != SLICE_ERROR) {
Thank you, LGTM. Ronald _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
