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

Laurent Aimar fenrir at via.ecp.fr
Fri Jun 5 10:05:57 CEST 2009


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.

-- 
fenrir



More information about the vlc-devel mailing list