avcodec/pcm: Better min_size for ff_alloc_packet2()

33318 -> 30601 decicycles

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2015-08-03 14:06:28 +02:00
parent fdc2385ca9
commit 4302a92835
1 changed files with 1 additions and 1 deletions

View 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;