100l divx501+ seeking bugfix
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 2 Jun 2002 22:08:04 +0000 (22:08 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 2 Jun 2002 22:08:04 +0000 (22:08 +0000)
Originally committed as revision 651 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/h263dec.c

index ea3a54e7152e41067ebad12bf73b05620fdcc8e0..6616a0e37b4bf90d4767235910692f6ddef6b632 100644 (file)
@@ -131,11 +131,11 @@ uint64_t time= rdtsc();
         return 0;
     }
 
-    if(s->bitstream_buffer_size){ //divx 5.01+ frame reorder
+    if(s->bitstream_buffer_size && buf_size<20){ //divx 5.01+ frame reorder
         init_get_bits(&s->gb, s->bitstream_buffer, s->bitstream_buffer_size);
-        s->bitstream_buffer_size=0;
     }else
         init_get_bits(&s->gb, buf, buf_size);
+    s->bitstream_buffer_size=0;
 
     /* let's go :-) */
     if (s->h263_msmpeg4) {