[FFmpeg-devel,v2,1/3] avformat/hlsenc: Call avio_flush during persistent http connections

Submitted by kjeyapal@akamai.com on Dec. 14, 2017, 4:50 p.m.

Details

Message ID 1513270249-21370-1-git-send-email-kjeyapal@akamai.com
State New
Headers show

Commit Message

kjeyapal@akamai.com Dec. 14, 2017, 4:50 p.m.
From: Karthick Jeyapal <kjeyapal@akamai.com>

Since close is not called, during http persistent connection,
flush needs to be called so that output is written on time.
---
 libavformat/hlsenc.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index fdf614b..30d0285 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);
     }
 }