[vlc-devel] input.c locking

Laurent Aimar fenrir at via.ecp.fr
Tue Nov 4 13:58:11 CET 2008

On Tue, Nov 04, 2008, Sébastien Escudier wrote:
> Quoting Laurent Aimar <fenrir at via.ecp.fr>:
> >  Inverting in vlm.c the lines
> > p_instance->p_sout = input_DetachSout( p_input );
> >  and
> > vlc_thread_join( p_input );
> >  should fix the bug.
> >
> > A assert inside input_DetachSout that checks on b_dead would be welcomed.
> ok, thank you for the answer. I agree with that, but isn't it useless?
> I mean, what's the point of detaching sout to delete it just after, as it would
> be deleted in destructor ?
 Because, it is not always destroyed. The sout is kept for sout-keep to work (for
both vlm and playlist).

> Another thing : In case of failure in Init (input.c) sout is deleted. But then
> b_sout_keep can't work anymore. Could we remove sout_DeleteInstance in case of
> Init error, as it would be deleted in destructor anyway.
 Probably needed for sout-keep anyway (but only if a sout has been provided).

> Then, one may use
> input_DetachSout before killing this thread.
 Not sure what you mean but input_DetachSout must be called ONLY on dead input.


More information about the vlc-devel mailing list