changeset 701:14c720e7b85c

Fixed bug of mplayer freezing - better
author arpi_esp
date Sat, 05 May 2001 15:44:07 +0000
parents c7a85e85f292
children b129cd2bbbb4
files mplayer.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Sat May 05 15:37:11 2001 +0000
+++ b/mplayer.c	Sat May 05 15:44:07 2001 +0000
@@ -1645,6 +1645,7 @@
 #endif
           (!f || getch2(20)<=0) && mplayer_get_key()<=0){
 	  video_out->check_events();
+          if(!f) usleep(1000); // do not eat the CPU
       }
       osd_function=OSD_PLAY;
   }
@@ -1660,7 +1661,7 @@
 #ifdef HAVE_LIRC
       (c=lirc_mp_getinput())>0 ||
 #endif
-      (!f && (c=getch2(0)))>0 || (c=mplayer_get_key())>0) switch(c){
+      (f && (c=getch2(0))>0) || (c=mplayer_get_key())>0) switch(c){
     // seek 10 sec
     case KEY_RIGHT:
       osd_function=OSD_FFW;