[vlc-devel] commit: core vout: Fix snapshots (Derk-Jan Hartman )

Rémi Denis-Courmont remi at remlab.net
Fri Jun 5 10:23:38 CEST 2009




On Fri, 5 Jun 2009 10:05:57 +0200, Laurent Aimar <fenrir at via.ecp.fr> wrote:
> On Fri, Jun 05, 2009, Rémi Denis-Courmont wrote:
>> > @@ -700,7 +700,7 @@ int vout_GetSnapshot( vout_thread_t *p_vout,
>> >             mdate() < i_deadline )
>> >      {
>> >          vlc_cond_timedwait( &p_sys->snapshot.wait,
>> &p_sys->snapshot.lock,
>> > -                            i_timeout );
>> > +                            i_deadline );
>> 
>> By the way, timedwait returns immediately if i_deadline is elapsed.
>> Checking mdate() above seems pointless.
>  It is in a while() loop and the conditions outside the deadline will
> not always succeed, so I have to check for timeout and not for supurious
> wake up. So unless there is a way to know why vlc_cond_timedwait has
> returned, I think it is needed.

vlc_cond_timedwait() returns 0 when it was signaled and ETIMEDOUT (!= 0) if
it timed out...

-- 
Rémi Denis-Courmont




More information about the vlc-devel mailing list