Commit 421e0859 authored by Mike Melanson's avatar Mike Melanson
Browse files

skip preamble bytes

Originally committed as revision 2189 to svn://
parent 8d876a43
......@@ -196,11 +196,14 @@ static int decode_frame(AVCodecContext *avctx,
// a->dsp.bswap_buf((uint32_t*)a->bitstream_buffer, (uint32_t*)buf, buf_size/4);
init_get_bits(&a->gb, a->bitstream_buffer, buf_size*8);
/* skip over 4 preamble bytes in stream (typically 0xXX 0xXX 0x00 0x38) */
skip_bits(&a->gb, 32);
a->qscale= get_bits(&a->gb, 16);
a->version= get_bits(&a->gb, 16);
skip_bits(&a->gb, 8*8);
printf("qscale:%d, version:%d\n", a->qscale, a->version);
printf("qscale:%d (0x%X), version:%d (0x%X)\n", a->qscale, a->qscale, a->version, a->version);
for(a->mb_y=0; a->mb_y<a->mb_height; a->mb_y++){
for(a->mb_x=0; a->mb_x<a->mb_width; a->mb_x++){
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