diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2020-03-21 17:23:52 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-07-07 20:48:50 +0200 |
commit | 0d81c0a10ee822e6198ab0c0868ac7e22ca9ac4e (patch) | |
tree | 68c5b14863560d6cbf918b6873fa0990505936e1 /libavformat/url.h | |
parent | 0f6b34bfeca799ffdeefa10581563a329f1915ef (diff) | |
download | ffmpeg-0d81c0a10ee822e6198ab0c0868ac7e22ca9ac4e.tar.gz |
avformat: Redo cleanup of demuxers upon read_header() failure
If reading the header fails, the demuxer's read_close() function (if
existing) is not called automatically; instead several demuxers call it
via "goto fail" in read_header().
This commit intends to change this by adding an internal flag for
demuxers that can be used to set on a per-AVInputFormat basis whether
read_close() should be called generically after an error during
read_header().
The flag controlling this behaviour needs to be added because it might
be unsafe to call read_close() generally (e.g. this might lead to
read_close() being called twice and this might e.g. lead to double-frees
if av_free() is used instead of av_freep(); or a size field has not
been reset after freeing the elements (see the mov demuxer for an
example of this)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/url.h')
0 files changed, 0 insertions, 0 deletions