mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-09-06 08:08:58 +02: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