diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-18 18:48:15 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-18 21:09:44 +0200 |
commit | 425b309fa43236f4b7c098c7829b70a421fc1dd7 (patch) | |
tree | 6612bde84c93b4a49f3b9e47b095097cac951aa2 /libavutil/dovi_meta.c | |
parent | 21b23ceab3cfcc2aa0a833bbff11cf38b2177800 (diff) | |
download | ffmpeg-425b309fa43236f4b7c098c7829b70a421fc1dd7.tar.gz |
avcodec/wrapped_avframe: Don't leak frame metadata, side-data
wrapped_avframe_decode() uses an AVFrame as dst in av_frame_move_ref()
after having called ff_decode_frame_props() to attach side-date
to this very frame. This leaks all the side-data and metadata
that ff_decode_frame_props() has attached.
This happens in various fate-filter-metadata tests since
6ca43a9675d651d7ea47c7ba2fafb1bf831c4d0b.
These particular leaks (which affect metadata-only)
could be fixed by not adding metadata side-data to AVPackets
in libavdevice if they are also available from the AVFrames.
Yet this would break users that extract the metadata from
AVPackets.
The changes to FATE happen because of the way av_dict_set()
works when it overwrites an already existing entry:
It overwrites the entry to be overwritten with the last entry
and adds the new entry at the end. The end result is that
the first entry of the dict is the second-to-last-entry of
the original dict, the last entry of the dict is the last
entry of the old dict and the first count - 2 entries
of the original dict are at positions 1..count - 2 in their
original order.
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavutil/dovi_meta.c')
0 files changed, 0 insertions, 0 deletions