[vlc-devel] [PATCH 1/2] stream: add stream_DemuxAlive

Rémi Denis-Courmont remi at remlab.net
Mon Apr 20 16:59:41 CEST 2015

Le lundi 20 avril 2015, 16:52:25 Julian Scheel a écrit :
> On 20.04.2015 15:25, Rémi Denis-Courmont wrote:
> > Le 2015-04-20 15:33, Julian Scheel a écrit :
> >> This will cause the access_demux to eat all system memory. Shouldn't
> >> we have a way out there?
> > 
> > You should not use the current stream_Demux in that case. That's all I
> > can say.
> Which brings us back to the initial patch by Francois...
> Just as francois I don't really see why it's racy - it's just allowing
> to read an atomic state variable from outside. But I surely miss
> something due to lack of knowledge about the stream_Demux internals?

It's racy with regards to event sequencing, not memory access. What do you do 
if the inner demux terminates while the outer demux is blocked on some 
unrelated operation?

Typically, the outer demux will waiting for reading data from the outer stream 
(or equivalent for access_demux).

Rémi Denis-Courmont

More information about the vlc-devel mailing list