[MPlayer-cvslog] r35226 - trunk/mplayer.c

reimar subversion at mplayerhq.hu
Mon Oct 1 21:47:46 CEST 2012


Author: reimar
Date: Mon Oct  1 21:47:45 2012
New Revision: 35226

Log:
Avoid sleeping for too long without reacting to user input.

Fixes bug #2092.

Modified:
   trunk/mplayer.c

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Sun Sep 30 11:48:37 2012	(r35225)
+++ trunk/mplayer.c	Mon Oct  1 21:47:45 2012	(r35226)
@@ -2292,8 +2292,15 @@ static int sleep_until_update(float *tim
     //============================== SLEEP: ===================================
 
     // flag 256 means: libvo driver does its timing (dvb card)
-    if (*time_frame > 0.001 && !(vo_flags & 256))
-        *time_frame = timing_sleep(*time_frame);
+    if (!(vo_flags & 256)) {
+        if (*time_frame > 1.5) {
+            // Avoid sleeping too long without reacting to user input
+            usec_sleep(1000000);
+            *time_frame -= GetRelativeTime();
+            frame_time_remaining = 1;
+	} else if (*time_frame > 0.001)
+            *time_frame = timing_sleep(*time_frame);
+    }
 
     handle_udp_master(mpctx->sh_video->pts);
 


More information about the MPlayer-cvslog mailing list