[SCM] libav/experimental: add state64 field to ParseContext storing last 8 bytes, to be able to check for longer startcodes
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:31:37 UTC 2013
The following commit has been merged in the experimental branch:
commit 98a8ce49644a640d1178cd57ed3a4db4edca2e69
Author: Baptiste Coudurier <baptiste.coudurier at gmail.com>
Date: Thu Oct 23 17:12:41 2008 +0000
add state64 field to ParseContext storing last 8 bytes, to be able to check for longer startcodes
Originally committed as revision 15671 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index 460693f..b7b6b8d 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -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++;
}
diff --git a/libavcodec/parser.h b/libavcodec/parser.h
index 4150870..3b6978f 100644
--- a/libavcodec/parser.h
+++ b/libavcodec/parser.h
@@ -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;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list