diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-08-07 23:40:43 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-08-24 01:00:56 +0200 |
commit | 257cd5fa389465032b2b222fff5ada9dfebeb4d0 (patch) | |
tree | c2d4b0f8afbcbe5b856b02550ef166fb3d1d300e /libavfilter/vf_scale.c | |
parent | 2a471af50aab02e8bb062c84a5779c7de1952fc0 (diff) | |
download | ffmpeg-257cd5fa389465032b2b222fff5ada9dfebeb4d0.tar.gz |
avfilter/vf_hwdownload: Fix leak of formats list upon error
If adding the list of input formats to its AVFilterLink fails, the list
of output formats (which has not been attached to permanent storage yet)
leaks. This has been fixed by not creating the lists of in- and output
formats simultaneously. Instead creating said lists is relegated to
ff_formats_pixdesc_filter() (this also avoids the reallocations implicit
in using ff_add_format()) and the second list is only created after (and
if) the first list has been permanently attached to its AVFilterLink.
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavfilter/vf_scale.c')
0 files changed, 0 insertions, 0 deletions