From 098ab932579ea6d81e0b928f09b425fdd00a2890 Mon Sep 17 00:00:00 2001 From: Bela Bodecs Date: Fri, 28 Jun 2019 13:54:27 +0800 Subject: avformat/hlsenc: temp_file usage for master playlist and vtt playlist currently master playlist and subtitle playlist creation does not use temporary files even when temp_file flag is set. Most of the use cases it is not a problem because master playlist creation happens once on the beginning of the whole process. But if master playlist is periodically re-created because of master_pl_refresh_rate is set, non-atomic playlist creation may cause problems in case of live streaming. This patch correct this behavior by adding this functionality. Reviewed-by: Steven Liu Signed-off-by: Bela Bodecs --- doc/muxers.texi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc/muxers.texi') diff --git a/doc/muxers.texi b/doc/muxers.texi index 59c93bc687..dd64672b85 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -893,7 +893,11 @@ This will produce segments like this: @item temp_file Write segment data to filename.tmp and rename to filename only once the segment is complete. A webserver serving up segments can be configured to reject requests to *.tmp to prevent access to in-progress segments -before they have been added to the m3u8 playlist. +before they have been added to the m3u8 playlist. This flag also affects how m3u8 playlist files are created. +If this flag is set, all playlist files will written into temporary file and renamed after they are complete, similarly as segments are handled. +But playlists with @code{file} protocol and with type (@code{hls_playlist_type}) other than @code{vod} +are always written into temporary file regardles of this flag. Master playlist files (@code{master_pl_name}), if any, with @code{file} protocol, +are always written into temporary file regardles of this flag if @code{master_pl_publish_rate} value is other than zero. @end table -- cgit v1.2.3