When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data.
Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> --- These encoders have the most unorthodox way of using their private data that I have ever seen. Will fix it later. libavcodec/libgsmenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/libgsmenc.c b/libavcodec/libgsmenc.c index fdb11c705e..eeaa5b2a10 100644 --- a/libavcodec/libgsmenc.c +++ b/libavcodec/libgsmenc.c @@ -98,7 +98,8 @@ static int libgsm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, gsm_signal *samples = (gsm_signal *)frame->data[0]; struct gsm_state *state = avctx->priv_data; - if ((ret = ff_alloc_packet2(avctx, avpkt, avctx->block_align, 0)) < 0) + if ((ret = ff_alloc_packet2(avctx, avpkt, avctx->block_align, + avctx->block_align)) < 0) return ret; switch(avctx->codec_id) { -- 2.27.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".