Mercurial > libavcodec.hg
comparison wmadec.c @ 5089:bff60ecc02f9 libavcodec
Use AV_xx throughout libavcodec
author | ramiro |
---|---|
date | Sat, 02 Jun 2007 01:41:07 +0000 |
parents | a10ebd496bd9 |
children | 9f8219a3b86f |
comparison
equal
deleted
inserted
replaced
5088:8e206208db1f | 5089:bff60ecc02f9 |
---|---|
90 /* extract flag infos */ | 90 /* extract flag infos */ |
91 flags1 = 0; | 91 flags1 = 0; |
92 flags2 = 0; | 92 flags2 = 0; |
93 extradata = avctx->extradata; | 93 extradata = avctx->extradata; |
94 if (avctx->codec->id == CODEC_ID_WMAV1 && avctx->extradata_size >= 4) { | 94 if (avctx->codec->id == CODEC_ID_WMAV1 && avctx->extradata_size >= 4) { |
95 flags1 = extradata[0] | (extradata[1] << 8); | 95 flags1 = AV_RL16(extradata); |
96 flags2 = extradata[2] | (extradata[3] << 8); | 96 flags2 = AV_RL16(extradata+2); |
97 } else if (avctx->codec->id == CODEC_ID_WMAV2 && avctx->extradata_size >= 6) { | 97 } else if (avctx->codec->id == CODEC_ID_WMAV2 && avctx->extradata_size >= 6) { |
98 flags1 = extradata[0] | (extradata[1] << 8) | | 98 flags1 = AV_RL32(extradata); |
99 (extradata[2] << 16) | (extradata[3] << 24); | 99 flags2 = AV_RL16(extradata+4); |
100 flags2 = extradata[4] | (extradata[5] << 8); | |
101 } | 100 } |
102 // for(i=0; i<avctx->extradata_size; i++) | 101 // for(i=0; i<avctx->extradata_size; i++) |
103 // av_log(NULL, AV_LOG_ERROR, "%02X ", extradata[i]); | 102 // av_log(NULL, AV_LOG_ERROR, "%02X ", extradata[i]); |
104 | 103 |
105 s->use_exp_vlc = flags2 & 0x0001; | 104 s->use_exp_vlc = flags2 & 0x0001; |