av_mallocz + av_init_packet leads to the same result as av_mallocz + av_packet_unref, but faster.
Signed-off-by: Andreas Rheinhardt <[email protected]> --- 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 [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
