[FFmpeg-devel] [PATCH] avcodec/hlsenc: Fix playlist not getting flushed when using custom io

Steve Lam steviewc at pm.me
Sun Sep 6 22:22:44 EEST 2020


---
 libavformat/hlsenc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index cb31d6aed7..fdfa907234 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -287,6 +287,7 @@ static int hlsenc_io_close(AVFormatContext *s, AVIOContext **pb, char *filename)
     if (!*pb)
         return ret;
     if (!http_base_proto || !hls->http_persistent || hls->key_info_file || hls->encrypt) {
+        avio_flush(*pb);
         ff_format_io_close(s, pb);
 #if CONFIG_HTTP_PROTOCOL
     } else {
-- 
2.17.1




More information about the ffmpeg-devel mailing list