[vlc-devel] [PATCH 0/8] Add drain support in sout

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

Le tiistaina 30. tammikuuta 2018, 10.38.25 EET Thomas Guillem a écrit :
> On Mon, Jan 29, 2018, at 19:26, Rémi Denis-Courmont wrote:
> > Le maanantaina 29. tammikuuta 2018, 19.25.48 EET Thomas Guillem a écrit :
> > > Hello,
> > > 
> > > This set of patches modifies the sout_mux/sout_access/sout behavior by
> > > handling drain when a NULL buffer is sent to pf_write/pf_send callbacks.
> > 
> > IMO, draining only makes sense on single ES. Furthermore, draining is only
> > meaningful in contrast to flushing. In stream output, you can assume that
> > an ES is being drained when it gets deleted. So there is really no point
> > in adding explicit draining, AFAICT.
> From my cc sout, I can drain the next sout chain by deleting them, I agree.
> But how do I know that I should wait for the client to read the final http
> stream when I'm closing ?

That one is easy: you should NEVER wait for the client to read. The HTTPd core 
already takes care of congestion control. Beyond that, if the client fails to 
read the stream to its end, the client has only its own self to blame.

In fact, making the HTTP server side wait for the client is a trivial DoS 


More information about the vlc-devel mailing list