Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: MP3/MPlayer plugin 0.8.3



On 20 Jan 2004 Juri Haberland <juri@koschikode.com> wrote:

> Did you look at the problem that a couple of people ran into (including me):
> If you pause a video and press the blue button or back afterwards,
> mplayer will not exit and the complete VDR will hang until the watchdog
> timeout kicks in.

Not until today ...

> I couldn't find a reason so far.

It seems that MPlayer doesn't reacts correctly to the "quit"
command while paused.

Please try this patch:

diff -u mp3-0.8.3/player-mplayer.c mp3-stable/player-mplayer.c
--- mp3-0.8.3/player-mplayer.c	2003-11-16 12:31:14.000000000 +0100
+++ mp3-stable/player-mplayer.c	2004-01-19 19:35:02.000000000 +0100
@@ -114,7 +114,22 @@
     }
   else if(started) {
     run=false;
-    if(slave) MPlayerControl("quit");
+    if(slave) {
+      Play(); // MPlayer ignores "quit" while paused
+      MPlayerControl("quit");
+      int until=time_ms()+3000; // wait some time until MPlayer is gone
+      d(printf("mplayer: waiting for child exit"))
+      while(!waitpid(pid,0,WNOHANG)) {
+        if(time_ms()>until) {
+          kill(pid,SIGKILL); // kill it anyways
+          d(printf(" SIGKILL"))
+          break;
+          }
+        usleep(250*1000);
+        d(printf("."))
+        }
+      d(printf("\n"))
+      }
     else kill(pid,SIGTERM);
     waitpid(pid,0,0); // get status otherwise the child stays as a zombie forever
     ClosePipe();


Regards.

-- 
Stefan Huelswitt
s.huelswitt@gmx.de  | http://www.muempf.de/


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index