[FFmpeg-devel] [PATCH 1/1] flush segments to guarantuee atomic single file hls

Daniel Oberhoff daniel at danieloberhoff.de
Wed Jan 16 17:03:32 EET 2019


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

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index ca57694e9e..2cd651d7e8 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -406,6 +406,7 @@ static int flush_dynbuf(VariantStream *vs, int *range_length)
     *range_length = avio_close_dyn_buf(ctx->pb, &buffer);
     ctx->pb = NULL;
     avio_write(vs->out, buffer, *range_length);
+    avio_flush(vs->out);
     av_free(buffer);
 
     // re-open buffer
-- 
2.16.2



More information about the ffmpeg-devel mailing list