]> git.sesse.net Git - ffmpeg/commit
vp9_metadata: Avoid allocations and copies of packet structures
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 19 Jun 2019 23:45:09 +0000 (01:45 +0200)
committerMark Thompson <sw@jkqxz.net>
Sun, 7 Jul 2019 22:04:33 +0000 (23:04 +0100)
commit98b122cdb9ef0920b7774e110407158805d6c136
tree5f4495b529e0530c19a846f56a33cdc977230bd7
parent42114094da35264c2b6710efa3772b2d5de6ba46
vp9_metadata: Avoid allocations and copies of packet structures

This commit changes vp9_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/vp9_metadata_bsf.c