av1_metadata: Avoid allocations and copies of packet structures
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 17 Jun 2019 03:42:07 +0000 (05:42 +0200)
committerMark Thompson <sw@jkqxz.net>
Sun, 7 Jul 2019 21:17:06 +0000 (22:17 +0100)
commit7549f0ac1baffabfa964962c0c0067e8da692982
tree8e3d97c45f86cd9c7ff9af7fb4ff4815311f596e
parent1e93f5060f6f6f7a8729022d0120004902b4f64b
av1_metadata: Avoid allocations and copies of packet structures

This commit changes av1_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/av1_metadata_bsf.c