diff options
author | Steven Liu <lq@chinaffmpeg.org> | 2019-08-20 10:31:01 +0800 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2019-08-21 16:46:31 +0800 |
commit | fa78a6abb379f9e8193bd02821aba006bd092ed4 (patch) | |
tree | c8ff7502a73125babf1780dc3fe3982bebe9540c /libavformat/hlsenc.c | |
parent | d1fe1344ea9890a29badd3ff48b600eb5225dca8 (diff) | |
download | ffmpeg-fa78a6abb379f9e8193bd02821aba006bd092ed4.tar.gz |
avformat/hlsenc: simplified code of use_localtime in hls_init
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Diffstat (limited to 'libavformat/hlsenc.c')
-rw-r--r-- | libavformat/hlsenc.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index c740cf2c56..9511b65e2d 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2875,17 +2875,10 @@ static int hls_init(AVFormatContext *s) } } - if (!hls->use_localtime) { - ret = sls_flag_check_duration_size_index(hls); - if (ret < 0) { - goto fail; - } - } else { - ret = sls_flag_check_duration_size(hls, vs); - if (ret < 0) { - goto fail; - } - } + ret = hls->use_localtime ? sls_flag_check_duration_size(hls, vs) : sls_flag_check_duration_size_index(hls); + if (ret < 0) + goto fail; + if (vs->has_subtitle) { if (hls->flags & HLS_SINGLE_FILE) |