aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/pcm.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-08-03 14:06:28 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-03 14:31:03 +0200
commit4302a92835313000d4bf8030baae32c2b130d8a1 (patch)
tree161dd6178403b1daab55fe9878136368d90db7bb /libavcodec/pcm.c
parentfdc2385ca96c99aa939380212d9046abe2e45262 (diff)
downloadffmpeg-4302a92835313000d4bf8030baae32c2b130d8a1.tar.gz
avcodec/pcm: Better min_size for ff_alloc_packet2()
33318 -> 30601 decicycles Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/pcm.c')
-rw-r--r--libavcodec/pcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 81d9f9259f..2cb5a360d6 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -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;