mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/assdec: 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
0de329e8e8
commit
ef7eaa4529
@ -160,8 +160,6 @@ static int ass_read_header(AVFormatContext *s)
|
|||||||
ff_subtitles_queue_finalize(s, &ass->q);
|
ff_subtitles_queue_finalize(s, &ass->q);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
if (res < 0)
|
|
||||||
ass_read_close(s);
|
|
||||||
av_bprint_finalize(&header, NULL);
|
av_bprint_finalize(&header, NULL);
|
||||||
av_bprint_finalize(&line, NULL);
|
av_bprint_finalize(&line, NULL);
|
||||||
av_bprint_finalize(&rline, NULL);
|
av_bprint_finalize(&rline, NULL);
|
||||||
@ -185,6 +183,7 @@ static int ass_read_seek(AVFormatContext *s, int stream_index,
|
|||||||
const AVInputFormat ff_ass_demuxer = {
|
const AVInputFormat ff_ass_demuxer = {
|
||||||
.name = "ass",
|
.name = "ass",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"),
|
.long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"),
|
||||||
|
.flags_internal = FF_FMT_INIT_CLEANUP,
|
||||||
.priv_data_size = sizeof(ASSContext),
|
.priv_data_size = sizeof(ASSContext),
|
||||||
.read_probe = ass_probe,
|
.read_probe = ass_probe,
|
||||||
.read_header = ass_read_header,
|
.read_header = ass_read_header,
|
||||||
|
Loading…
Reference in New Issue
Block a user