]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/pcm.c
aacenc: allocate a larger buffer for the TNS LPC context
[ffmpeg] / libavcodec / pcm.c
index 81d9f9259ffd4392be5c9188e2af0ea5594234d3..2cb5a360d617f06e342f44cfa038601370b87879 100644 (file)
@@ -97,7 +97,7 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     n           = frame->nb_samples * avctx->channels;
     samples     = (const short *)frame->data[0];
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, n * sample_size, 0)) < 0)
+    if ((ret = ff_alloc_packet2(avctx, avpkt, n * sample_size, n * sample_size)) < 0)
         return ret;
     dst = avpkt->data;