1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

hlsenc: flush segments to guarantuee atomic single file hls

This commit is contained in:
Daniel Oberhoff 2019-09-14 09:53:22 +08:00 committed by Steven Liu
parent 3b5ce76b1a
commit 88a26abcc6

View File

@ -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);