mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/samidec: 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
48de45ea59
commit
7ae7d93653
@ -115,8 +115,6 @@ static int sami_read_header(AVFormatContext *s)
|
||||
ff_subtitles_queue_finalize(s, &sami->q);
|
||||
|
||||
end:
|
||||
if (res < 0)
|
||||
ff_subtitles_queue_clean(&sami->q);
|
||||
av_bprint_finalize(&buf, NULL);
|
||||
return res;
|
||||
}
|
||||
@ -146,6 +144,7 @@ const AVInputFormat ff_sami_demuxer = {
|
||||
.name = "sami",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("SAMI subtitle format"),
|
||||
.priv_data_size = sizeof(SAMIContext),
|
||||
.flags_internal = FF_FMT_INIT_CLEANUP,
|
||||
.read_probe = sami_probe,
|
||||
.read_header = sami_read_header,
|
||||
.read_packet = sami_read_packet,
|
||||
|
Loading…
Reference in New Issue
Block a user