Mailing List archive

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

[vdr] Re: MP3/MPlayer plugin 0.8.3



Stefan Huelswitt wrote:

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.


I was also experiencing this problem. It seems this patch solves the problem.
I'd suggest integration it into the next plugin release.

Thank you,


Dirk


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



Home | Main Index | Thread Index