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:00:37 +0200 |
commit | 43ac74a7d88b6659b332bceec85c7761ebb4e9fc (patch) | |
tree | 5e89897d5c10126bd0771eaa12b6819dee3ca9ae | |
parent | c6686388aab8cba1689b7ae743a6fc154414797c (diff) | |
download | ffmpeg-43ac74a7d88b6659b332bceec85c7761ebb4e9fc.tar.gz |
avformat/subviewerdec: Simplify cleanup after read_header failure
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavformat/subviewerdec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/subviewerdec.c b/libavformat/subviewerdec.c index 9bb7728407..2ef3c088eb 100644 --- a/libavformat/subviewerdec.c +++ b/libavformat/subviewerdec.c @@ -176,8 +176,6 @@ static int subviewer_read_header(AVFormatContext *s) ff_subtitles_queue_finalize(s, &subviewer->q); end: - if (res < 0) - ff_subtitles_queue_clean(&subviewer->q); av_bprint_finalize(&header, NULL); return res; } @@ -207,6 +205,7 @@ const AVInputFormat ff_subviewer_demuxer = { .name = "subviewer", .long_name = NULL_IF_CONFIG_SMALL("SubViewer subtitle format"), .priv_data_size = sizeof(SubViewerContext), + .flags_internal = FF_FMT_INIT_CLEANUP, .read_probe = subviewer_probe, .read_header = subviewer_read_header, .read_packet = subviewer_read_packet, |