Commit 4302a928 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/pcm: Better min_size for ff_alloc_packet2()

33318 -> 30601 decicycles
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent fdc2385c
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment