Merge commit '141c960e21d2860e354f9b90df136184dd00a9a8'
authorJames Almer <jamrial@gmail.com>
Tue, 11 Sep 2018 17:02:58 +0000 (14:02 -0300)
committerJames Almer <jamrial@gmail.com>
Tue, 11 Sep 2018 17:02:58 +0000 (14:02 -0300)
* commit '141c960e21d2860e354f9b90df136184dd00a9a8':
  libfdk-aacenc: Fix building with libfdk-aac v2

Merged-by: James Almer <jamrial@gmail.com>
1  2 
libavcodec/libfdk-aacenc.c

@@@ -345,9 -354,18 +354,16 @@@ static int aac_encode_frame(AVCodecCont
              return ret;
      }
  
+     in_buffer_element_size   = 2;
+     in_buf.numBufs           = 1;
+     in_buf.bufs              = &in_ptr;
+     in_buf.bufferIdentifiers = &in_buffer_identifier;
+     in_buf.bufSizes          = &in_buffer_size;
+     in_buf.bufElSizes        = &in_buffer_element_size;
      /* The maximum packet size is 6144 bits aka 768 bytes per channel. */
 -    if ((ret = ff_alloc_packet(avpkt, FFMAX(8192, 768 * avctx->channels)))) {
 -        av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");
 +    if ((ret = ff_alloc_packet2(avctx, avpkt, FFMAX(8192, 768 * avctx->channels), 0)) < 0)
          return ret;
 -    }
  
      out_ptr                   = avpkt->data;
      out_buffer_size           = avpkt->size;