diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2020-03-21 21:52:43 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-07-07 23:50:02 +0200 |
commit | c6e9672b50f4d341f94d3fd2ec3c2fc180dacc66 (patch) | |
tree | 6302450bf67e04a5619da6952ab809c1d847ce97 /libavcodec/wavpack.c | |
parent | cc768bf7e44d8d98a9b42dff47cb9deff23050d4 (diff) | |
download | ffmpeg-c6e9672b50f4d341f94d3fd2ec3c2fc180dacc66.tar.gz |
avformat/mov: Simplify cleanup after read_header failure
By default, a demuxer's read_close function is not called automatically
if an error happens when reading the header; instead it is up to the
demuxer to clean up after itself in this case. The mov demuxer did this
by calling its read_close function when it encountered some errors when
reading the header.
This commit changes this by setting the FF_FMT_INIT_CLEANUP flag so that
mov_read_close() is automatically called when an error happens when
reading the header.
(Btw: mov_read_close() is not idempotent: Calling it twice is
dangerouos, because MOVContext.frag_index.item will be av_freep'ed,
yet MOVContext.frag_index.nb_items won't be reset. So the calls to
mov_read_close() have to be removed before the switch to freeing
generically.)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/wavpack.c')
0 files changed, 0 insertions, 0 deletions