[MPlayer-users] reenabled xscreensaver blocks /dev/dsp
Jonas Jermann
jjermann at gmx.net
Wed Aug 28 11:37:02 CEST 2002
On Wed, Aug 28, 2002 at 11:08:16AM +0200, Petr Pajas wrote:
> Second, I'd like to report this minor problem: I was playing a bit
> with the xscreensaver disabling/reenabling feature and found the
> following bug: after xscreensaver is respowned by system("xscreensaver
> --nosplash &") command in the video output uninitialization module the
> created subprocess keeps blocking audio device (/dev/dsp) even after
> mplayer itselfs ends. For example, consider the following:
>
> $ lsof /dev/dsp # /dev/dsp is free
>
> $ mplayer -stop_xscreensaver file1.avi
>
> $ lsof /dev/dsp
> COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
> xscreensaver 2668 pajas 7w CHR 14,3 207356 /dev/dsp
>
> $ mplayer file2.avi # has NO AUDIO
>
> or even with
>
> mplayer -stop_xscreensaver file1.avi file2.avi
>
> the file2.avi has no audio.
>
> It seems this is caused by the unix habbit of fork()/execv() to leave
> all filehandles opened for the child-process. I've tried ad-hoc to
> switch the audio and video output un-initialization code in mplayer.c,
> recompiled and everything worked ok, but I don't see this as a clean
> solution, since xscreensaver might still be blocking some other
> hardware in some circumstances.
It did, albeu added the un-initialization on many places, but as
you said, it's ugly ;) somebody should provide a better
xscreensaver support, there have been other discussions about it
afair.
Regards
Jonas
More information about the MPlayer-users
mailing list