From 88a26abcc6579c4e63c42a8ca26f7f93ae5d4e0d Mon Sep 17 00:00:00 2001 From: Daniel Oberhoff Date: Sat, 14 Sep 2019 09:53:22 +0800 Subject: hlsenc: flush segments to guarantuee atomic single file hls --- libavformat/hlsenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 9070a39..8491d84 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); -- cgit v1.1