[vlc-devel] commit: Removed useless date check when using vlc_cond_timedwait. ( Laurent Aimar )

git version control git at videolan.org
Fri Jun 5 20:33:02 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Jun  5 20:31:52 2009 +0200| [9a6e630292fb596a96782926481ac0b6c1260fe7] | committer: Laurent Aimar 

Removed useless date check when using vlc_cond_timedwait.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9a6e630292fb596a96782926481ac0b6c1260fe7
---

 src/video_output/vout_intf.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
index 984547a..9824f7c 100644
--- a/src/video_output/vout_intf.c
+++ b/src/video_output/vout_intf.c
@@ -696,11 +696,11 @@ int vout_GetSnapshot( vout_thread_t *p_vout,
     p_sys->snapshot.i_request++;
 
     const mtime_t i_deadline = mdate() + i_timeout;
-    while( p_sys->snapshot.b_available && !p_sys->snapshot.p_picture &&
-           mdate() < i_deadline )
+    while( p_sys->snapshot.b_available && !p_sys->snapshot.p_picture )
     {
-        vlc_cond_timedwait( &p_sys->snapshot.wait, &p_sys->snapshot.lock,
-                            i_deadline );
+        if( vlc_cond_timedwait( &p_sys->snapshot.wait, &p_sys->snapshot.lock,
+                                i_deadline ) )
+            break;
     }
 
     picture_t *p_picture = p_sys->snapshot.p_picture;




More information about the vlc-devel mailing list