[FFmpeg-cvslog] hlsenc: flush segments to guarantuee atomic single file hls

Daniel Oberhoff git at videolan.org
Sat Sep 14 05:02:33 EEST 2019


ffmpeg | branch: master | Daniel Oberhoff <daniel at danieloberhoff.de> | Sat Sep 14 09:53:22 2019 +0800| [88a26abcc6579c4e63c42a8ca26f7f93ae5d4e0d] | committer: Steven Liu

hlsenc: flush segments to guarantuee atomic single file hls

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=88a26abcc6579c4e63c42a8ca26f7f93ae5d4e0d
---

 libavformat/hlsenc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 9070a39eeb..8491d84b70 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -466,6 +466,7 @@ static int flush_dynbuf(VariantStream *vs, int *range_length)
     *range_length = avio_close_dyn_buf(ctx->pb, &vs->temp_buffer);
     ctx->pb = NULL;
     avio_write(vs->out, vs->temp_buffer, *range_length);
+    avio_flush(vs->out);
 
     // re-open buffer
     return avio_open_dyn_buf(&ctx->pb);



More information about the ffmpeg-cvslog mailing list