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

Rémi Denis-Courmont remi at remlab.net
Tue Jan 30 17:36:54 CET 2018


Le maanantaina 29. tammikuuta 2018, 19.25.54 EET Thomas Guillem a écrit :
> ---
>  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;

I don't see the point in doing this. The access is already destroying the 
stream; it should not need to do anything else.

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list