diff h263dec.c @ 1211:126f766bc4c5 libavcodec

cleanup mpeg1/2 bitstream parser
author michaelni
date Tue, 22 Apr 2003 13:55:12 +0000
parents 03b97d87dcdd
children ad21a7b2349b
line wrap: on
line diff
--- a/h263dec.c	Tue Apr 22 08:36:39 2003 +0000
+++ b/h263dec.c	Tue Apr 22 13:55:12 2003 +0000
@@ -325,14 +325,16 @@
             }
         }
     }
-    
-    for(; i<buf_size; i++){
+
+    if(vop_found){    
+      for(; i<buf_size; i++){
         state= (state<<8) | buf[i];
         if((state&0xFFFFFF00) == 0x100){
             pc->frame_start_found=0;
             pc->state=-1; 
             return i-3;
         }
+      }
     }
     pc->frame_start_found= vop_found;
     pc->state= state;