aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/hlsenc.c
diff options
context:
space:
mode:
authorDaniel Oberhoff <daniel@danieloberhoff.de>2019-09-14 09:53:22 +0800
committerSteven Liu <lq@chinaffmpeg.org>2019-09-14 09:53:22 +0800
commit88a26abcc6579c4e63c42a8ca26f7f93ae5d4e0d (patch)
tree1f2d3291c59a4d0f713140e353644d7526b478ee /libavformat/hlsenc.c
parent3b5ce76b1a68430f07645eaebe77946116977dbb (diff)
downloadffmpeg-88a26abcc6579c4e63c42a8ca26f7f93ae5d4e0d.tar.gz
hlsenc: flush segments to guarantuee atomic single file hls
Diffstat (limited to 'libavformat/hlsenc.c')
-rw-r--r--libavformat/hlsenc.c1
1 files changed, 1 insertions, 0 deletions
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);