You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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:
@@ -97,7 +97,7 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
|||||||
n = frame->nb_samples * avctx->channels;
|
n = frame->nb_samples * avctx->channels;
|
||||||
samples = (const short *)frame->data[0];
|
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;
|
return ret;
|
||||||
dst = avpkt->data;
|
dst = avpkt->data;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user