[vlc-devel] [PATCH] Handle GET_PARAMETER keepalive responses during PAUSE

Paul Clark paul at packetship.com
Thu Jun 25 13:27:58 CEST 2015


On 25/06/15 12:07, Paul Clark wrote:
> On 25/06/15 11:52, Rémi Denis-Courmont wrote:
>>
>>>  I'm hoping, BTW, that Demux() and Control() are always called in the
>>> same thread?
>>
>> All calls to Demux() and Control() are serialized by the caller.
>>
>
> OK, then would it be enough for TimeoutPrevention() to lock the mutex 
> used to serialise Demux() and Control() calls around its interaction 
> with LIVE555?  I've just been looking at vlc_threads.h - is it one of 
> the global locks, or if not is there some other way a module can get 
> hold of it?

Ah, on further investigation I see you meant that Demux() and Control() 
are serialised within the single MainLoop (src/input/input.c:700) 
thread, no locks involved.  There is also the interesting comment there:

         /* FIXME if p_input->p->i_state == PAUSE_S the access/access_demux
          * is paused -> this may cause problem with some of them
          * The same problem can be seen when seeking while paused */

Which I think is exactly the issue we're seeing here.

It looks like the solution is to apply an internal mutex in live555.cpp 
between the whole of Demux()/Control() and the TimeoutPrevention() calls 
to LIVE555.  I'll give that a go...

Best regards

Paul




More information about the vlc-devel mailing list