avcodec_encode_audio2: Increase the audio buffer size.
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 19 Mar 2012 21:20:04 +0000 (22:20 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 19 Mar 2012 21:20:04 +0000 (22:20 +0100)
Fixes Ticket1104

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/utils.c

index 23ab832..6b65542 100644 (file)
@@ -1024,7 +1024,7 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
                    implement encode2() */
                 buf_size = 2 * avctx->frame_size * avctx->channels *
                            av_get_bytes_per_sample(avctx->sample_fmt);
-                buf_size += FF_MIN_BUFFER_SIZE;
+                buf_size += 2*FF_MIN_BUFFER_SIZE;
             }
         }
         if ((ret = ff_alloc_packet(avpkt, buf_size)))