Mercurial > libavcodec.hg
diff vp3.c @ 2533:06985f4138e3 libavcodec
04-vp3 fix(by matthieu castet).patch
author | michael |
---|---|
date | Thu, 03 Mar 2005 02:24:20 +0000 |
parents | eed7d92a1dfc |
children | 5ea2a7f74817 |
line wrap: on
line diff
--- a/vp3.c Wed Mar 02 20:46:06 2005 +0000 +++ b/vp3.c Thu Mar 03 02:24:20 2005 +0000 @@ -2919,13 +2919,20 @@ Vp3DecodeContext *s = avctx->priv_data; GetBitContext gb; int ptype; + uint8_t *p= avctx->extradata; + int op_bytes, i; s->theora = 1; if (!avctx->extradata_size) return -1; - init_get_bits(&gb, avctx->extradata, avctx->extradata_size); + for(i=0;i<3;i++) { + op_bytes = *(p++)<<8; + op_bytes += *(p++); + + init_get_bits(&gb, p, op_bytes); + p += op_bytes; ptype = get_bits(&gb, 8); debug_vp3("Theora headerpacket type: %x\n", ptype); @@ -2948,6 +2955,7 @@ theora_decode_tables(avctx, gb); break; } + } return 0; }