[vlc-devel] [PATCH 6/8] sout_access/http: handle drain

Thomas Guillem thomas at gllm.fr
Mon Jan 29 18:25:54 CET 2018


---
 modules/access_output/http.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/access_output/http.c b/modules/access_output/http.c
index 38d633a0ed..6e7e9a5f5c 100644
--- a/modules/access_output/http.c
+++ b/modules/access_output/http.c
@@ -342,6 +342,13 @@ static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer )
     int i_err = 0;
     int i_len = 0;
 
+    if( unlikely( !p_buffer ) )
+    {
+        /* Drain */
+        httpd_StreamSend( p_sys->p_httpd_stream, NULL );
+        return 0;
+    }
+
     while( p_buffer )
     {
         block_t *p_next;
-- 
2.11.0



More information about the vlc-devel mailing list