[vlc-devel] commit: Extensions: new script capability "input-listener" ( Jean-Philippe André )
Jean-Philippe André
jpeg at videolan.org
Wed Feb 3 22:07:17 CET 2010
Wednesday 03 February 2010, 21:01:19,
Laurent Aimar wrote:
> On Wed, Feb 03, 2010, git version control wrote:
> > + p_ext->p_sys->p_input = p_input ? vlc_object_hold( p_input )
> > + : p_input;
>
> Just to nitpick, using p_input ? hold() : NULL will be more
> readable.
Right, this was a typo. (I won't commit just for this, but it will be "fixed"
:-) )
>On Wed, Feb 03, 2010, git version control wrote:
>> + vlc_mutex_lock( &p_ext->p_sys->command_lock );
>> vlc_cond_signal( &p_ext->p_sys->wait );
>> + vlc_mutex_unlock( &p_ext->p_sys->command_lock );
>
>lock(); signal(); unlock() usually means there is a problem, unless
>of course the wake up condition is protected by another lock and is
>already set before these lines.
Oh well, I'm confusing myself then. The condition depends on the command_lock.
The issue I had was that the thread sometimes never woke up. After these
lines, the calling thread will wait for the signaled thread to end (join).
Actually, as I'm tracking a race condition, I don't know how to find the right
fix. But since that commit, the race didn't appear :-/
Best regards,
--
Jean-Philippe André (jpeg)
More information about the vlc-devel
mailing list