diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-10-07 01:51:30 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-10-10 14:30:07 +0200 |
commit | c06d3d24047206f9c11bfc5849544b960e5d68eb (patch) | |
tree | b79e072175f13a4e90da7b75fa7c3ce436c222e0 /COPYING.GPLv2 | |
parent | d98dfcecad179260182d90ed1d170c1037db7568 (diff) | |
download | ffmpeg-c06d3d24047206f9c11bfc5849544b960e5d68eb.tar.gz |
fftools/ffmpeg_demux: Fix leak on error
An AVFormatContext leaks on errors that happen before it is attached
to its permanent place (an InputFile). Fix this by attaching
it earlier.
Given that it is not documented that avformat_close_input() is usable
with an AVFormatContext that has only been allocated with
avformat_alloc_context() and not opened with avformat_open_input(),
one error path before avformat_open_input() had to be treated
specially: It uses avformat_free_context().
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'COPYING.GPLv2')
0 files changed, 0 insertions, 0 deletions