mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 01:42:20 +00:00
avformat/realtextdec: Simplify cleanup after read_header failure
by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
b00c9c74af
commit
5a58e58215
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user