summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Liu <lq@chinaffmpeg.org>2017-11-02 22:29:28 +0800
committerSteven Liu <lq@chinaffmpeg.org>2017-11-02 22:29:28 +0800
commitc52beb4839e030a15b68919b822cb25ad553b9bc (patch)
tree6da6fe41040c80547b7f6a01823ebe1be8684266
parentd5995c531d6e9e20e126ae64665783abe959d82b (diff)
avformat/hlsenc: check hls segment mode for ignore the init filename
ignore the fmp4_init_filename when in normal hls segment mode Signed-off-by: Steven Liu <lq@onvideo.cn>
-rw-r--r--libavformat/hlsenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 0ea93480a5..6d573db094 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -1443,6 +1443,7 @@ static int hls_write_header(AVFormatContext *s)
}
}
+ if (hls->segment_type == SEGMENT_TYPE_FMP4) {
if (av_strcasecmp(hls->fmp4_init_filename, "init.mp4")) {
hls->base_output_dirname = av_malloc(fmp4_init_filename_len);
if (!hls->base_output_dirname) {
@@ -1472,6 +1473,7 @@ static int hls_write_header(AVFormatContext *s)
av_strlcpy(hls->base_output_dirname, hls->fmp4_init_filename, fmp4_init_filename_len);
}
}
+ }
if (!hls->use_localtime) {
ret = sls_flag_check_duration_size_index(hls);