mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
Merge commit 'bc76c46943272515805d7ac48ca39f14826d1fed'
* commit 'bc76c46943272515805d7ac48ca39f14826d1fed':
aac: Wait to know the channels before allocating frame
Conflicts:
libavcodec/aacdec.c
See: 676a395ab9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
153d23ee39
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user