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> --- ff_alloc_packet2() call (for the actual packets, not this end-of-stream packet), yet the size known in advance is not exact. libavcodec/libxavs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c index a83b93b836..6be3d02be8 100644 --- a/libavcodec/libxavs.c +++ b/libavcodec/libxavs.c @@ -150,7 +150,7 @@ static int XAVS_frame(AVCodecContext *avctx, AVPacket *pkt, if (!ret) { if (!frame && !(x4->end_of_stream)) { - if ((ret = ff_alloc_packet2(avctx, pkt, 4, 0)) < 0) + if ((ret = ff_alloc_packet2(avctx, pkt, 4, 4)) < 0) return ret; pkt->data[0] = 0x0; -- 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".