/* extract flag infos */
flags2 = 0;
extradata = avctx->extradata;
- if (avctx->codec->id == CODEC_ID_WMAV1 && avctx->extradata_size >= 4) {
+ if (avctx->codec->id == AV_CODEC_ID_WMAV1 && avctx->extradata_size >= 4) {
flags2 = AV_RL16(extradata+2);
- } else if (avctx->codec->id == CODEC_ID_WMAV2 && avctx->extradata_size >= 6) {
+ } else if (avctx->codec->id == AV_CODEC_ID_WMAV2 && avctx->extradata_size >= 6) {
flags2 = AV_RL16(extradata+4);
}
// for(i=0; i<avctx->extradata_size; i++)
s->use_bit_reservoir = flags2 & 0x0002;
s->use_variable_block_len = flags2 & 0x0004;
- if(avctx->codec->id == CODEC_ID_WMAV2 && avctx->extradata_size >= 8){
+ if(avctx->codec->id == AV_CODEC_ID_WMAV2 && avctx->extradata_size >= 8){
if(AV_RL16(extradata+4)==0xd && s->use_variable_block_len){
av_log(avctx, AV_LOG_WARNING, "Disabling use_variable_block_len, if this fails contact the ffmpeg developers and send us the file\n");
s->use_variable_block_len= 0; // this fixes issue1503
}
}
- if(avctx->channels > MAX_CHANNELS){
- av_log(avctx, AV_LOG_ERROR, "Invalid number of channels (%d)\n", avctx->channels);
- return -1;
- }
-
if(ff_wma_init(avctx, flags2)<0)
return -1;
s->last_superframe_len= 0;
}
+#if CONFIG_WMAV1_DECODER
AVCodec ff_wmav1_decoder = {
.name = "wmav1",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_WMAV1,
+ .id = AV_CODEC_ID_WMAV1,
.priv_data_size = sizeof(WMACodecContext),
.init = wma_decode_init,
.close = ff_wma_end,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"),
};
-
+#endif
+#if CONFIG_WMAV2_DECODER
AVCodec ff_wmav2_decoder = {
.name = "wmav2",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_WMAV2,
+ .id = AV_CODEC_ID_WMAV2,
.priv_data_size = sizeof(WMACodecContext),
.init = wma_decode_init,
.close = ff_wma_end,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"),
};
+#endif