[FFmpeg-cvslog] avformat/hlsenc: Call avio_flush during persistent http connections

Karthick J git at videolan.org
Fri Dec 15 16:21:47 EET 2017


ffmpeg | branch: master | Karthick J <kjeyapal at akamai.com> | Fri Dec 15 21:24:08 2017 +0800| [deceb7d9aeb7d00bc0078638925a38614c3f607b] | committer: Steven Liu

avformat/hlsenc: Call avio_flush during persistent http connections

Since close is not called, during http persistent connection,
flush needs to be called so that output is written on time.

Signed-off-by: Steven Liu <lq at chinaffmpeg.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=deceb7d9aeb7d00bc0078638925a38614c3f607b
---

 libavformat/hlsenc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index fdf614bdd1..30d0285c32 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -266,6 +266,8 @@ static void hlsenc_io_close(AVFormatContext *s, AVIOContext **pb, char *filename
 
     if (!http_base_proto || !hls->http_persistent || hls->key_info_file || hls->encrypt) {
         ff_format_io_close(s, pb);
+    } else {
+        avio_flush(*pb);
     }
 }
 



More information about the ffmpeg-cvslog mailing list