Commit 153d23ee authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'bc76c469'

* commit 'bc76c469':
  aac: Wait to know the channels before allocating frame

Conflicts:
	libavcodec/aacdec.c

See: 676a395aMerged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 476692ab bc76c469
......@@ -2987,6 +2987,9 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
if (avctx->debug & FF_DEBUG_STARTCODE)
av_log(avctx, AV_LOG_DEBUG, "Elem type:%x id:%x\n", elem_type, elem_id);
if (!avctx->channels && elem_type != TYPE_PCE)
goto fail;
if (elem_type < TYPE_DSE) {
if (!(che=get_che(ac, elem_type, elem_id))) {
av_log(ac->avctx, AV_LOG_ERROR, "channel element %d.%d is not allocated\n",
......@@ -3076,6 +3079,11 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
}
}
if (!avctx->channels) {
*got_frame_ptr = 0;
return 0;
}
spectral_to_sample(ac);
multiplier = (ac->oc[1].m4ac.sbr == 1) ? ac->oc[1].m4ac.ext_sample_rate > ac->oc[1].m4ac.sample_rate : 0;
......
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