# HG changeset patch # User bcoudurier # Date 1224781961 0 # Node ID 8c1e1047ec78fd911dd9bfa837920d98e7837a4d # Parent a591c3736fd8249fd7b69904c156fc48983232a0 add state64 field to ParseContext storing last 8 bytes, to be able to check for longer startcodes diff -r a591c3736fd8 -r 8c1e1047ec78 parser.c --- a/parser.c Thu Oct 23 07:30:16 2008 +0000 +++ b/parser.c Thu Oct 23 17:12:41 2008 +0000 @@ -274,6 +274,7 @@ /* 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++; } diff -r a591c3736fd8 -r 8c1e1047ec78 parser.h --- a/parser.h Thu Oct 23 07:30:16 2008 +0000 +++ b/parser.h Thu Oct 23 17:12:41 2008 +0000 @@ -34,6 +34,7 @@ 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;