hlsenc: flush segments to guarantuee atomic single file hls
This commit is contained in:
parent
3b5ce76b1a
commit
88a26abcc6
@ -466,6 +466,7 @@ static int flush_dynbuf(VariantStream *vs, int *range_length)
|
|||||||
*range_length = avio_close_dyn_buf(ctx->pb, &vs->temp_buffer);
|
*range_length = avio_close_dyn_buf(ctx->pb, &vs->temp_buffer);
|
||||||
ctx->pb = NULL;
|
ctx->pb = NULL;
|
||||||
avio_write(vs->out, vs->temp_buffer, *range_length);
|
avio_write(vs->out, vs->temp_buffer, *range_length);
|
||||||
|
avio_flush(vs->out);
|
||||||
|
|
||||||
// re-open buffer
|
// re-open buffer
|
||||||
return avio_open_dyn_buf(&ctx->pb);
|
return avio_open_dyn_buf(&ctx->pb);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user