[FFmpeg-cvslog] r17533 - trunk/libavcodec/vc1_parser.c

michael subversion
Sun Feb 22 21:48:12 CET 2009


Author: michael
Date: Sun Feb 22 21:48:12 2009
New Revision: 17533

Log:
Fix vc1 split().
Fixes Subtitle-sample.evo, issue52.

Modified:
   trunk/libavcodec/vc1_parser.c

Modified: trunk/libavcodec/vc1_parser.c
==============================================================================
--- trunk/libavcodec/vc1_parser.c	Sun Feb 22 19:13:40 2009	(r17532)
+++ trunk/libavcodec/vc1_parser.c	Sun Feb 22 21:48:12 2009	(r17533)
@@ -99,11 +99,17 @@ static int vc1_split(AVCodecContext *avc
 {
     int i;
     uint32_t state= -1;
+    int charged=0;
 
     for(i=0; i<buf_size; i++){
         state= (state<<8) | buf[i];
-        if(IS_MARKER(state) && state != VC1_CODE_SEQHDR && state != VC1_CODE_ENTRYPOINT)
-            return i-3;
+        if(IS_MARKER(state)){
+            if(state == VC1_CODE_SEQHDR || state == VC1_CODE_ENTRYPOINT){
+                charged=1;
+            }else if(charged){
+                return i-3;
+            }
+        }
     }
     return 0;
 }




More information about the ffmpeg-cvslog mailing list