[MPlayer-users] reenabled xscreensaver blocks /dev/dsp

Petr Pajas pajas at ufal.ms.mff.cuni.cz
Wed Aug 28 11:29:03 CEST 2002


Hi,

First, MPlayer rulez!

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.

Best regards,

-- Petr Pajas




More information about the MPlayer-users mailing list