aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/lswsutils.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-07-10 23:08:26 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-10-17 18:04:37 +0200
commiteb17bf6fd3da5136d3b15c7e608a317826fd15f9 (patch)
treea1f2d52ce5ab6b92111010574d1635c4b490d2f4 /libavfilter/lswsutils.c
parent2fca09bce49c7de590560d9517fd2414b6c0c14f (diff)
downloadffmpeg-eb17bf6fd3da5136d3b15c7e608a317826fd15f9.tar.gz
mpeg4_unpack_bframes: Avoid allocations and copies of packet structures
1. Since bd90a2ec, mpeg4_unpack_bframes caches whole packets instead of just the pointer to the buffer and the buffer's size in order to be able to make use of refcounting to avoid copying of data; this unfortunately introduced copies of packet structures and side data (if existing), although the only fields that are needed are the buffer-related ones (data, size and buf). This can be changed without compromising the advantages of refcounting by storing a reference to the buffer. 2. This change also makes it easy to use only one packet throughout so that an allocation and free of an AVPacket structure per filtered packet can be saved by switching to ff_bsf_get_packet_ref. 3. Furthermore, this commit also fixes a memleak introduced in bd90a2ec: If a stored b_frame with side data was used for a later frame, the side data would leak when the input frame's properties were copied into the output frame. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/lswsutils.c')
0 files changed, 0 insertions, 0 deletions