]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit 'bc76c46943272515805d7ac48ca39f14826d1fed'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 7 Jun 2015 23:45:54 +0000 (01:45 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 8 Jun 2015 00:28:44 +0000 (02:28 +0200)
* commit 'bc76c46943272515805d7ac48ca39f14826d1fed':
  aac: Wait to know the channels before allocating frame

Conflicts:
libavcodec/aacdec.c

See: 676a395ab903cac623c5d6ddd0928c789e08a59e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/aacdec.c

index eab889f789b026c90a9997277733b166a03d1a7a,683aee25d5090345ed13608e952232e195425158..2d12512671e36578318db3ae922217dce49213e9
@@@ -2984,9 -2834,9 +2984,12 @@@ static int aac_decode_frame_int(AVCodec
      while ((elem_type = get_bits(gb, 3)) != TYPE_END) {
          elem_id = get_bits(gb, 4);
  
 +        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",