From a0cd98b5943a7807aff837f9adba1dd034ec2272 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 22 May 2011 19:06:10 +0200 Subject: [PATCH] Fix ticket127 This fixes detectiion of slightly too big dummy frames. Signed-off-by: Michael Niedermayer --- libavcodec/h263dec.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index b56fd06516..bf6a856796 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -681,22 +681,18 @@ retry: frame_end: /* divx 5.01+ bistream reorder stuff */ if(s->codec_id==CODEC_ID_MPEG4 && s->divx_packed){ - int current_pos= get_bits_count(&s->gb)>>3; + int current_pos= s->gb.buffer == s->bitstream_buffer ? 0 : (get_bits_count(&s->gb)>>3); int startcode_found=0; if(buf_size - current_pos > 5){ int i; - for(i=current_pos; igb.buffer == s->bitstream_buffer && buf_size>7 && s->xvid_build>=0){ //xvid style - startcode_found=1; - current_pos=0; - } if(startcode_found){ av_fast_malloc(