av_mallocz + av_init_packet leads to the same result as av_mallocz + av_packet_unref, but faster.
Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> --- libavcodec/avpacket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c index 2b20067211..858f827a0a 100644 --- a/libavcodec/avpacket.c +++ b/libavcodec/avpacket.c @@ -54,7 +54,7 @@ AVPacket *av_packet_alloc(void) if (!pkt) return pkt; - av_packet_unref(pkt); + av_init_packet(pkt); return pkt; } -- 2.20.1 _______________________________________________ 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".