diff options
author | Mike Melanson <mike@multimedia.cx> | 2003-09-01 15:53:01 +0000 |
---|---|---|
committer | Mike Melanson <mike@multimedia.cx> | 2003-09-01 15:53:01 +0000 |
commit | 421e08590340c717d69ac8c76a46cad7c7c2e0f8 (patch) | |
tree | 770686d8dc43dfc71a331e04c3fd2f5d1bb8d7c9 /libavcodec/mdec.c | |
parent | 8d876a433cd0b8137a952e36a8ebd2ed5a42cd21 (diff) | |
download | ffmpeg-421e08590340c717d69ac8c76a46cad7c7c2e0f8.tar.gz |
skip preamble bytes
Originally committed as revision 2189 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mdec.c')
-rw-r--r-- | libavcodec/mdec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c index c2acf47777..01e544cf9e 100644 --- a/libavcodec/mdec.c +++ b/libavcodec/mdec.c @@ -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++){ |