Mercurial > libavcodec.hg
changeset 1878:838c18d1e7fc libavcodec
be smarter about the variable size of the extra SVQ3 data
author | melanson |
---|---|
date | Sat, 13 Mar 2004 21:26:54 +0000 |
parents | 869256817a91 |
children | dd63cb7e5080 |
files | svq3.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/svq3.c Sat Mar 13 20:07:38 2004 +0000 +++ b/svq3.c Sat Mar 13 21:26:54 2004 +0000 @@ -767,6 +767,7 @@ H264Context *const h = avctx->priv_data; int m, mb_type; unsigned char *extradata; + unsigned int size; *data_size = 0; @@ -799,12 +800,15 @@ 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) {