]> git.sesse.net Git - ffmpeg/commitdiff
add state64 field to ParseContext storing last 8 bytes, to be able to check for longe...
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Thu, 23 Oct 2008 17:12:41 +0000 (17:12 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Thu, 23 Oct 2008 17:12:41 +0000 (17:12 +0000)
Originally committed as revision 15671 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/parser.c
libavcodec/parser.h

index 460693f2dd15ea6110b1aaf173dae7cf53c2458a..b7b6b8df9dfd8352b9e31f04425ff735e3d58f52 100644 (file)
@@ -274,6 +274,7 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
     /* 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++;
     }
 
index 4150870c8438255543977cfc4e0a11b4b9fb4983..3b6978fe1e4f6364cdd7077c514ba0ba3d54243e 100644 (file)
@@ -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;