1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00
FFmpeg/tests/ref
Andreas Rheinhardt 425b309fa4 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
6ca43a9675.

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>
2022-07-18 21:09:44 +02:00
..
acodec tests/ref: Remove unused reference files 2022-05-03 04:18:06 +02:00
fate avcodec/wrapped_avframe: Don't leak frame metadata, side-data 2022-07-18 21:09:44 +02:00
lavf fate: add PFM encoder tests 2022-07-03 15:16:31 +02:00
lavf-fate avformat/matroskaenc: Don't waste bytes to Write Tag length fields 2022-06-20 23:42:28 +02:00
pixfmt
seek avcodec/mpegvideo_enc: Fix a chroma mb size error in sse_mb() 2022-07-09 21:05:02 +02:00
vsynth avcodec/mpegvideo_enc: Fix a chroma mb size error in sse_mb() 2022-07-09 21:05:02 +02:00