/* Validate the extradata if the stream is already MPEG-4 AudioSpecificConfig */
if (ctx->par_in->extradata) {
MPEG4AudioConfig mp4ac;
- int ret = avpriv_mpeg4audio_get_config(&mp4ac, ctx->par_in->extradata,
- ctx->par_in->extradata_size * 8, 1);
+ int ret = avpriv_mpeg4audio_get_config2(&mp4ac, ctx->par_in->extradata,
+ ctx->par_in->extradata_size, 1, ctx);
if (ret < 0) {
av_log(ctx, AV_LOG_ERROR, "Error parsing AudioSpecificConfig extradata!\n");
return ret;
if ((ret = init_get_bits8(&gb, avctx->extradata, avctx->extradata_size)) < 0)
return ret;
- config_offset = avpriv_mpeg4audio_get_config(&m4ac, avctx->extradata,
- avctx->extradata_size * 8, 1);
+ config_offset = avpriv_mpeg4audio_get_config2(&m4ac, avctx->extradata,
+ avctx->extradata_size, 1, avctx);
if (config_offset < 0)
return AVERROR_INVALIDDATA;
return AVERROR_INVALIDDATA;
}
- avpriv_mpeg4audio_get_config(&cfg, avctx->extradata,
- avctx->extradata_size * 8, 1);
+ avpriv_mpeg4audio_get_config2(&cfg, avctx->extradata,
+ avctx->extradata_size, 1, avctx);
if (!cfg.chan_config || cfg.chan_config > 7) {
av_log(avctx, AV_LOG_ERROR, "Invalid channel config number.\n");
return AVERROR_INVALIDDATA;