Message ID | 20190116150332.56301-2-daniel@danieloberhoff.de |
---|---|
State | New |
Headers | show |
> Subject: flush segments to guarantuee atomic single file hls
^ nit no. 1: guarantee
Nit no. 2: Please use a commit line something like:
avformat/hlsenc: flush segments to guarantee atomic single file hls
(I'm not sure I agree with the wording, but I'm no HLS expert.)
Does this fix some known bug worth mentioning?
Moritz
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