Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Liu <lingjiujianke@gmail.com>2016-08-30 12:26:54 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-08-31 03:48:39 +0300
commit3aab6fa6baf8f5511a9dec5996a303e25716f185 (patch)
treee71fdeb78ae18d909689d03b36becccf6998a96a /libavformat
parent9fbf0660c170ff0757d2dfa2025d7287e79a8917 (diff)
avformat/hlsenc: add warning for append_list and hls_init_time option
When use append_list mode, the hls_init_time set nouse, Because the append_list only support append at the old m3u8 end cannot set init segments durations at the middle of the list. That's invalid. and show a warning message for user. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/hlsenc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index ab4a9bfce6..81b7efaa28 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -812,6 +812,12 @@ static int hls_write_header(AVFormatContext *s)
if (hls->flags & HLS_APPEND_LIST) {
parse_playlist(s, s->filename);
+ if (hls->init_time > 0) {
+ av_log(s, AV_LOG_WARNING, "append_list mode does not support hls_init_time,"
+ " hls_init_time value will have no effect\n");
+ hls->init_time = 0;
+ hls->recording_time = hls->time * AV_TIME_BASE;
+ }
}
if ((ret = hls_start(s)) < 0)