mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-22 06:46:59 +00:00
avformat/hlsenc: Localize initialization of subtitle streams
Before this commit, the checks were unnecessarily scattered. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
191b51254c
commit
e1dfb5128b
@ -2878,13 +2878,6 @@ static int hls_init(AVFormatContext *s)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (vs->has_subtitle) {
|
||||
vs->vtt_oformat = av_guess_format("webvtt", NULL, NULL);
|
||||
if (!vs->vtt_oformat) {
|
||||
ret = AVERROR_MUXER_NOT_FOUND;
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
if (hls->segment_filename) {
|
||||
ret = format_name(hls->segment_filename, &vs->basename, i, vs->varname);
|
||||
if (ret < 0)
|
||||
@ -2979,6 +2972,9 @@ static int hls_init(AVFormatContext *s)
|
||||
goto fail;
|
||||
|
||||
if (vs->has_subtitle) {
|
||||
vs->vtt_oformat = av_guess_format("webvtt", NULL, NULL);
|
||||
if (!vs->vtt_oformat)
|
||||
return AVERROR_MUXER_NOT_FOUND;
|
||||
|
||||
if (hls->flags & HLS_SINGLE_FILE)
|
||||
vtt_pattern = ".vtt";
|
||||
|
Loading…
Reference in New Issue
Block a user