avformat/hlsenc: add hls_flag option to write segments to temporary file until complete
authorAman Gupta <aman@tmm1.net>
Tue, 7 Feb 2017 03:58:43 +0000 (11:58 +0800)
committerSteven Liu <lq@chinaffmpeg.org>
Tue, 7 Feb 2017 03:58:43 +0000 (11:58 +0800)
commit606eac7b07133b0904c2b8b4eb1dc70e1bd0c9a6
tree84a252f532df392adb787abaf11e523f3f866f08
parenta6cee50fa206466f7a5fe8a46f87561a403ff52f
avformat/hlsenc: add hls_flag option to write segments to temporary file until complete

Adds a `-hls_flags +temp_file` which will write segment data to
filename.tmp, and then rename to filename when the segment is complete.

This patch is similar in spirit to one used in Plex's ffmpeg fork, and
allows a transcoding webserver to ensure incomplete segment files are
never served up accidentally.

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Reviewed-by: Bodecs Bela <bodecsb@vivanet.hu>
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
doc/muxers.texi
libavformat/hlsenc.c