FFmpeg/libavformat
Andreas Rheinhardt 020159e0e7 avformat/mux: Move packet references
In the common case that the input packet was already refcounted,
ff_interleave_add_packet would allocate a new AVPacketList, use
av_packet_ref to create a new reference to the buffer for the
AVPacketList's packet, interleave the packet and finally unreference
the original input packet.
This commit changes this: It uses av_packet_move_ref to transfer
the packet to its destination. In case the input packet is refcounted,
this saves an allocation and a free (of an AVBufferRef); if not, the
packet is made refcounted before moving it. When the input packet has
side data, one saves even more than one allocation+free.

Furthermore, when the packet is in reality an uncoded frame, a hacky
ad-hoc variant of av_packet_move_ref has been employed. Not any more.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-26 17:24:41 +01:00
..
2020-01-08 01:32:26 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2020-01-08 01:32:26 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-08-13 15:38:57 +02:00
2019-12-12 19:25:33 +01:00
2019-12-25 22:10:47 +01:00
2019-10-29 16:20:33 +01:00
2019-12-12 19:25:33 +01:00
2020-01-08 01:32:26 +01:00
2019-12-12 19:25:33 +01:00
2020-01-26 17:24:41 +01:00
2019-12-11 16:24:16 +01:00
2019-12-12 19:25:33 +01:00
2019-10-08 13:47:16 +08:00
2019-12-12 19:25:33 +01:00
2020-01-26 17:24:41 +01:00
2019-12-12 19:25:33 +01:00
2019-05-20 11:58:12 -07:00
2020-01-26 17:24:41 +01:00
2019-09-27 12:15:50 +02:00
2019-12-12 19:25:33 +01:00
2019-09-02 23:08:43 +02:00
2018-02-11 20:03:33 +01:00
2018-02-11 20:03:33 +01:00
2019-11-27 23:54:20 +01:00
2019-12-12 19:25:33 +01:00
2020-01-08 01:32:26 +01:00
2019-12-12 19:25:33 +01:00
2018-05-21 19:43:04 -03:00
2018-05-21 19:43:04 -03:00
2019-03-20 18:38:48 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2020-01-23 12:08:20 +05:30
2019-06-14 21:36:39 +02:00
2020-01-08 01:32:26 +01:00
2020-01-07 22:35:52 -03:00
2019-12-12 19:25:33 +01:00