[FFmpeg-cvslog] avformat/realtextdec: Simplify cleanup after read_header failure
Andreas Rheinhardt
git at videolan.org
Thu Jul 8 16:45:11 EEST 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Mar 21 18:31:06 2020 +0100| [5a58e582159da9286b227eb27537c44c9a6ed233] | committer: Andreas Rheinhardt
avformat/realtextdec: Simplify cleanup after read_header failure
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5a58e582159da9286b227eb27537c44c9a6ed233
---
libavformat/realtextdec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavformat/realtextdec.c b/libavformat/realtextdec.c
index 3aeeee8d1c..e0e2cc90e6 100644
--- a/libavformat/realtextdec.c
+++ b/libavformat/realtextdec.c
@@ -124,8 +124,6 @@ static int realtext_read_header(AVFormatContext *s)
end:
av_bprint_finalize(&buf, NULL);
- if (res < 0)
- ff_subtitles_queue_clean(&rt->q);
return res;
}
@@ -154,6 +152,7 @@ const AVInputFormat ff_realtext_demuxer = {
.name = "realtext",
.long_name = NULL_IF_CONFIG_SMALL("RealText subtitle format"),
.priv_data_size = sizeof(RealTextContext),
+ .flags_internal = FF_FMT_INIT_CLEANUP,
.read_probe = realtext_probe,
.read_header = realtext_read_header,
.read_packet = realtext_read_packet,
More information about the ffmpeg-cvslog
mailing list