]> git.sesse.net Git - ffmpeg/commit
h264_metadata: Avoid allocations and copies of packet structures
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 17 Jun 2019 03:42:13 +0000 (05:42 +0200)
committerMark Thompson <sw@jkqxz.net>
Sun, 7 Jul 2019 21:17:07 +0000 (22:17 +0100)
commita72cc47a275a62c9a36f9df8c912e6f1cd820fc7
tree0c313dcf817b7adec2c6ba8f491093636b303263
parent36fcdc3fbe089bc01066e2afa5645f383025f0ec
h264_metadata: Avoid allocations and copies of packet structures

This commit changes h264_metadata to (a) use ff_bsf_get_packet_ref
instead of ff_bsf_get_packet (thereby avoiding one malloc and free per
filtered packet) and (b) to use only one packet structure at all,
thereby avoiding a call to av_packet_copy_props.

(b) has been made possible by the recent changes to ff_cbs_write_packet.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/h264_metadata_bsf.c