[vlc-devel] commit: Use mwait and remove silly msleep usage ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Sep 7 13:04:29 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Sep  7 13:09:13 2008 +0300| [86572816b953e45bcad594fbbd0386b322b7638e] | committer: Rémi Denis-Courmont 

Use mwait and remove silly msleep usage

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

 modules/demux/mjpeg.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/modules/demux/mjpeg.c b/modules/demux/mjpeg.c
index 7f76650..5415864 100644
--- a/modules/demux/mjpeg.c
+++ b/modules/demux/mjpeg.c
@@ -386,14 +386,11 @@ static int MjpgDemux( demux_t *p_demux )
     demux_sys_t *p_sys = p_demux->p_sys;
     int i;
 
-    if( p_sys->b_still && p_sys->i_still_end && p_sys->i_still_end < mdate() )
+    if( p_sys->b_still && p_sys->i_still_end )
     {
         /* Still frame, wait until the pause delay is gone */
+        mwait( p_sys->i_still_end );
         p_sys->i_still_end = 0;
-    }
-    else if( p_sys->b_still && p_sys->i_still_end )
-    {
-        msleep( 400 );
         return 1;
     }
 




More information about the vlc-devel mailing list