diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2020-03-21 18:31:06 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-07-08 14:06:21 +0200 |
commit | 7ef252b64afa7195e2eba3651559ac19c1a33c73 (patch) | |
tree | 10918a11771d3283d58e1b77a18dd7373ba69de9 /libavformat | |
parent | 480094b2a67bd261ea3034b899d2932273a44c6f (diff) | |
download | ffmpeg-7ef252b64afa7195e2eba3651559ac19c1a33c73.tar.gz |
avformat/tedcaptionsdec: Simplify cleanup after read_header failure
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/tedcaptionsdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/tedcaptionsdec.c b/libavformat/tedcaptionsdec.c index 8bebaba5c0..4bf93e26e2 100644 --- a/libavformat/tedcaptionsdec.c +++ b/libavformat/tedcaptionsdec.c @@ -288,7 +288,6 @@ static av_cold int tedcaptions_read_header(AVFormatContext *avf) if (ret == AVERROR_INVALIDDATA) av_log(avf, AV_LOG_ERROR, "Syntax error near offset %"PRId64".\n", avio_tell(avf->pb)); - ff_subtitles_queue_clean(&tc->subs); return ret; } ff_subtitles_queue_finalize(avf, &tc->subs); @@ -358,6 +357,7 @@ const AVInputFormat ff_tedcaptions_demuxer = { .name = "tedcaptions", .long_name = NULL_IF_CONFIG_SMALL("TED Talks captions"), .priv_data_size = sizeof(TEDCaptionsDemuxer), + .flags_internal = FF_FMT_INIT_CLEANUP, .priv_class = &tedcaptions_demuxer_class, .read_header = tedcaptions_read_header, .read_packet = tedcaptions_read_packet, |