summaryrefslogtreecommitdiff
path: root/libavcodec/svq3.c
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2004-03-13 21:26:54 +0000
committerMike Melanson <mike@multimedia.cx>2004-03-13 21:26:54 +0000
commitebcd2f968969192dd1286d9cbdd41197bff09a2f (patch)
treeb483171a7970dcc44f5ac8724a390b83e642a685 /libavcodec/svq3.c
parent36d9b4e80b72f8d87c8142fc8e07a8ce58944c73 (diff)
be smarter about the variable size of the extra SVQ3 data
Originally committed as revision 2881 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/svq3.c')
-rw-r--r--libavcodec/svq3.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index 6a53ed2399..1e73a3ff12 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -767,6 +767,7 @@ static int svq3_decode_frame (AVCodecContext *avctx,
H264Context *const h = avctx->priv_data;
int m, mb_type;
unsigned char *extradata;
+ unsigned int size;
*data_size = 0;
@@ -799,12 +800,15 @@ static int svq3_decode_frame (AVCodecContext *avctx,
extradata++;
}
+ size = (extradata[4] << 24) | (extradata[5] << 16) |
+ (extradata[6] << 8) | extradata[7];
+
/* if a match was found, parse the extra data */
if (!memcmp (extradata, "SEQH", 4)) {
GetBitContext gb;
- init_get_bits (&gb, extradata + 0x8, 8*8);
+ init_get_bits (&gb, extradata + 8, size);
/* 'frame size code' and optional 'width, height' */
if (get_bits (&gb, 3) == 7) {