Re: [vdr] VDR timer + mplayer = VDR crash. Please fix!

2007-06-13 Thread VDR User
Ok, after much testing Stefan's patch frequently aborts mplayer
playback when a timer is triggered while Anssi's doesn't.  I don't
know why this is if both patches are essentially doing the same thing
during the same time.  Something must be different to give different
results.

At any rate, please don't accept Stefan's method into the next version
of the plugin until this last problem has been resolved.

Many thanks for the work to fix this once and for all!

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] VDR timer + mplayer = VDR crash. Please fix!

2007-06-08 Thread Anssi Hannula
Stefan Huelswitt wrote:
 On 07 Jun 2007 Anssi Hannula [EMAIL PROTECTED] wrote:
 
 Attached is a patch for mplayer plugin which closes file descriptors 
 (except 0, 1, 2) when forking mplayer script.
 
 Thanks.
 I took over that with slight changes. The final patch is attached.
 Could I please have some feedback if it's working as good as
 yours?

Testing confirms it is closing the file descriptors as well, yes :)

-- 
Anssi Hannula

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] VDR timer + mplayer = VDR crash. Please fix!

2007-06-08 Thread VDR User
On 6/8/07, Stefan Huelswitt [EMAIL PROTECTED] wrote:
  Attached is a patch for mplayer plugin which closes file descriptors
  (except 0, 1, 2) when forking mplayer script.

 Thanks.
 I took over that with slight changes. The final patch is attached.
 Could I please have some feedback if it's working as good as
 yours?

I have tested your patch severl times in a row just now and while VDR
did not crash once, mplayer playback was aborted about 20% of the time
when the timer was triggered.  This doesn't (or hasn't so far) happen
with Anssi's patch however.  What are the differences between when/how
he closes the file descriptors and when/how you are?

Many thanks Stefan  Anssi!

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] VDR timer + mplayer = VDR crash. Please fix!

2007-06-08 Thread VDR User
On 6/8/07, Stefan Huelswitt [EMAIL PROTECTED] wrote:
 As far as I see there is no difference beside the different way
 to get the max. number of filedescriptors, but this shouldn't
 have any impact.

The difference of how/when the fd's were being closed was the only
thing I can think of that may be different between your patch and
Anssi's.  No other changes were made so I'm really at a loss why your
version of the fix randomly aborts playback.  Can you think of any
further tests I can do?

Cheers

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] VDR timer + mplayer = VDR crash. Please fix!

2007-06-07 Thread Jan Willies
VDR User schrieb:
 If a timer is triggered while the mplayer plugin is in use, VDR
 crashes.  This has happened to me about a zillion times now and I'm
 hoping somebody will fix this!  You can use the mplayer plugin after a
 timer is started no problem.  Correct me if I'm wrong but mplayer
 should never have to take control of the tuner in the first place
 since it's not required to play a media file.

Same thing with externalplayer-plugin and MMS. When you play a movie 
with mplayer and a timer is triggered, VDR crashes.

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] VDR timer + mplayer = VDR crash. Please fix!

2007-06-07 Thread Chris
Thursday, June 7, 2007, 3:03:53 AM, VDR wrote:
 If a timer is triggered while the mplayer plugin is in use, VDR
 crashes.  This has happened to me about a zillion times now and I'm
 hoping somebody will fix this!  You can use the mplayer plugin after a
 timer is started no problem.  Correct me if I'm wrong but mplayer
 should never have to take control of the tuner in the first place
 since it's not required to play a media file.

Like I said last time this topic came up: I somehow got rid off the
problem. I don't exactly remember the last thread about this problem
and I didn't keep the mails - but wasn't there someone who also got
rid off this problem by updating mplayer to a current SVN version?

I thought it had something to do with VDR's DVB settings and stuff
but I also updated mplayer.
Currently I'm using MPlayer dev-SVN-r22825-4.1.2 and VDR does not
crash when a timer triggers (or stops) while using mplayer. Well,
at least here.

--
Chris


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] VDR timer + mplayer = VDR crash. Please fix!

2007-06-07 Thread Anssi Hannula

VDR User wrote:

On 6/6/07, Anssi Hannula [EMAIL PROTECTED] wrote:

VDR User wrote:

If a timer is triggered while the mplayer plugin is in use, VDR
crashes.  This has happened to me about a zillion times now and I'm
hoping somebody will fix this!  You can use the mplayer plugin after a
timer is started no problem.  Correct me if I'm wrong but mplayer
should never have to take control of the tuner in the first place
since it's not required to play a media file.

Free booze to anyone who can fix this incredibly annoying problem once
and for all!!

This could be related to the fact that when mplayer-plugin forks mplayer
from vdr, the /dev/dvb/adapter* file descriptors are copied as well and
are not closed.


Thanks for such a quick reply Anssi!  Is that an easy thing to fix?


Attached is a patch for mplayer plugin which closes file descriptors 
(except 0, 1, 2) when forking mplayer script.


--
Anssi Hannula
diff -Nurp -x '*~' mp3-0.9.15/player-mplayer.c mp3-0.9.15-c/player-mplayer.c
--- mp3-0.9.15/player-mplayer.c	2006-09-19 21:17:50.0 +0300
+++ mp3-0.9.15-c/player-mplayer.c	2007-06-07 23:34:17.0 +0300
@@ -29,6 +29,7 @@
 #include sys/ioctl.h
 #include sys/types.h
 #include sys/poll.h
+#include sys/resource.h
 #include unistd.h
 #include signal.h
 #include wait.h
@@ -395,6 +396,11 @@ bool cMPlayerPlayer::Fork(void)
   close(outpipe[1]);
   }
 
+  rlimit lim;
+  if(getrlimit(RLIMIT_NOFILE, lim) == 0)
+for(int i = lim.rlim_max - 1; i  2; i--)
+   close(i);
+
 char cmd[64+PATH_MAX*2], aid[20];
 char *fname=Quote(file-FullPath());
 if(MPlayerAid=0) snprintf(aid,sizeof(aid), AID %d,MPlayerAid);
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] VDR timer + mplayer = VDR crash. Please fix!

2007-06-06 Thread VDR User
If a timer is triggered while the mplayer plugin is in use, VDR
crashes.  This has happened to me about a zillion times now and I'm
hoping somebody will fix this!  You can use the mplayer plugin after a
timer is started no problem.  Correct me if I'm wrong but mplayer
should never have to take control of the tuner in the first place
since it's not required to play a media file.

Free booze to anyone who can fix this incredibly annoying problem once
and for all!!

Thanks. :)

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] VDR timer + mplayer = VDR crash. Please fix!

2007-06-06 Thread Anssi Hannula
VDR User wrote:
 If a timer is triggered while the mplayer plugin is in use, VDR
 crashes.  This has happened to me about a zillion times now and I'm
 hoping somebody will fix this!  You can use the mplayer plugin after a
 timer is started no problem.  Correct me if I'm wrong but mplayer
 should never have to take control of the tuner in the first place
 since it's not required to play a media file.
 
 Free booze to anyone who can fix this incredibly annoying problem once
 and for all!!

This could be related to the fact that when mplayer-plugin forks mplayer 
from vdr, the /dev/dvb/adapter* file descriptors are copied as well and 
are not closed.

-- 
Anssi Hannula

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] VDR timer + mplayer = VDR crash. Please fix!

2007-06-06 Thread VDR User
On 6/6/07, Anssi Hannula [EMAIL PROTECTED] wrote:
 VDR User wrote:
  If a timer is triggered while the mplayer plugin is in use, VDR
  crashes.  This has happened to me about a zillion times now and I'm
  hoping somebody will fix this!  You can use the mplayer plugin after a
  timer is started no problem.  Correct me if I'm wrong but mplayer
  should never have to take control of the tuner in the first place
  since it's not required to play a media file.
 
  Free booze to anyone who can fix this incredibly annoying problem once
  and for all!!

 This could be related to the fact that when mplayer-plugin forks mplayer
 from vdr, the /dev/dvb/adapter* file descriptors are copied as well and
 are not closed.

Thanks for such a quick reply Anssi!  Is that an easy thing to fix?

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr