[FFmpeg-cvslog] r15671 - in trunk/libavcodec: parser.c parser.h

bcoudurier subversion
Thu Oct 23 19:12:41 CEST 2008


Author: bcoudurier
Date: Thu Oct 23 19:12:41 2008
New Revision: 15671

Log:
add state64 field to ParseContext storing last 8 bytes, to be able to check for longer startcodes

Modified:
   trunk/libavcodec/parser.c
   trunk/libavcodec/parser.h

Modified: trunk/libavcodec/parser.c
==============================================================================
--- trunk/libavcodec/parser.c	(original)
+++ trunk/libavcodec/parser.c	Thu Oct 23 19:12:41 2008
@@ -274,6 +274,7 @@ int ff_combine_frame(ParseContext *pc, i
     /* store overread bytes */
     for(;next < 0; next++){
         pc->state = (pc->state<<8) | pc->buffer[pc->last_index + next];
+        pc->state64 = (pc->state64<<8) | pc->buffer[pc->last_index + next];
         pc->overread++;
     }
 

Modified: trunk/libavcodec/parser.h
==============================================================================
--- trunk/libavcodec/parser.h	(original)
+++ trunk/libavcodec/parser.h	Thu Oct 23 19:12:41 2008
@@ -34,6 +34,7 @@ typedef struct ParseContext{
     int frame_start_found;
     int overread;               ///< the number of bytes which where irreversibly read from the next frame
     int overread_index;         ///< the index into ParseContext.buffer of the overread bytes
+    uint64_t state64;           ///< contains the last 8 bytes in MSB order
 } ParseContext;
 
 struct MpegEncContext;




More information about the ffmpeg-cvslog mailing list