Commit 4f2baee0 authored by melanson's avatar melanson

be smarter about the variable size of the extra SVQ3 data


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2881 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7ee06159
...@@ -767,6 +767,7 @@ static int svq3_decode_frame (AVCodecContext *avctx, ...@@ -767,6 +767,7 @@ static int svq3_decode_frame (AVCodecContext *avctx,
H264Context *const h = avctx->priv_data; H264Context *const h = avctx->priv_data;
int m, mb_type; int m, mb_type;
unsigned char *extradata; unsigned char *extradata;
unsigned int size;
*data_size = 0; *data_size = 0;
...@@ -799,12 +800,15 @@ static int svq3_decode_frame (AVCodecContext *avctx, ...@@ -799,12 +800,15 @@ static int svq3_decode_frame (AVCodecContext *avctx,
extradata++; extradata++;
} }
size = (extradata[4] << 24) | (extradata[5] << 16) |
(extradata[6] << 8) | extradata[7];
/* if a match was found, parse the extra data */ /* if a match was found, parse the extra data */
if (!memcmp (extradata, "SEQH", 4)) { if (!memcmp (extradata, "SEQH", 4)) {
GetBitContext gb; GetBitContext gb;
init_get_bits (&gb, extradata + 0x8, 8*8); init_get_bits (&gb, extradata + 8, size);
/* 'frame size code' and optional 'width, height' */ /* 'frame size code' and optional 'width, height' */
if (get_bits (&gb, 3) == 7) { if (get_bits (&gb, 3) == 7) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment