[vlc-devel] input.c locking
fenrir at via.ecp.fr
Tue Nov 4 12:47:29 CET 2008
On Tue, Nov 04, 2008, Laurent Aimar wrote:
> On Tue, Nov 04, 2008, Sébastien Escudier wrote:
> > Hi
> > I am trying to debug input.c sout handling (you can see the mail I sent
> > yesterday for more details).
> > Would it be ok to use "vlc_mutex_t lock_control" to lock the use of
> > p_input->p->p_sout ?
> No, this lock is only to protect the buffered control commands.
> > If not, can I create a new mutex in struct input_thread_private_t
> I don't think it is the good way anyway, input_DetachSout should be called
> ONLY when p_input->b_dead is true otherwise it may still be used (by es_out
> and decoders).
> Calling input_DetachSout after input_StopThread without a waiting loop
> is wrong.
Inverting in vlm.c the lines
p_instance->p_sout = input_DetachSout( p_input );
vlc_thread_join( p_input );
should fix the bug.
A assert inside input_DetachSout that checks on b_dead would be welcomed.
More information about the vlc-devel