freeze fix
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 2 May 2002 20:45:43 +0000 (20:45 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 2 May 2002 20:45:43 +0000 (20:45 +0000)
Originally committed as revision 434 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/h263dec.c

index 7a0e0ab4dc1bbce7cde98f5a4f656f5613e55f76..1f8ef678b82d5f1932f26d201df1936381d33a79 100644 (file)
@@ -117,9 +117,10 @@ static int h263_decode_frame(AVCodecContext *avctx,
         return 0;
     }
 
-    if(s->bitstream_buffer_size) //divx 5.01+ frame reorder
+    if(s->bitstream_buffer_size){ //divx 5.01+ frame reorder
         init_get_bits(&s->gb, s->bitstream_buffer, s->bitstream_buffer_size);
-    else
+        s->bitstream_buffer_size=0;
+    }else
         init_get_bits(&s->gb, buf, buf_size);
 
     /* let's go :-) */
@@ -256,8 +257,7 @@ static int h263_decode_frame(AVCodecContext *avctx,
             memcpy(s->bitstream_buffer, buf + current_pos, buf_size - current_pos);
             s->bitstream_buffer_size= buf_size - current_pos;
         }
-    }else
-        s->bitstream_buffer_size=0;
+    }
   
     MPV_frame_end(s);