[MPlayer-dev-eng] Re: Re: [patch] release /dev/dsp on pause

D Richard Felker III dalias at aerifal.cx
Wed Aug 28 21:47:22 CEST 2002


On Wed, Aug 28, 2002 at 08:57:04PM +0200, Eric Lammerts wrote:
> 
> On Wed, Aug 28, 2002 at 06:27:14PM +0200, Alex Beregszaszi wrote:
> > > I have a patch similar to yours, but in my case mplayer doesn't crash
> > > when I unpause and the device is busy. It simply blocks until /dev/dsp
> > > is released by the other app. (because the open() in reset() has no
> > > O_NONBLOCK).
> 
> > Could you post your patch too?
> 
> Here it is; the only difference with Richard's patch is that this one is
> guarded against multiple uninit()'s. Reset() starts with an uninit(), so
> this really happens.

Mine was too. That's what setting the fd to -1 is for. close(-1) does
nothing but set errno.


Rich




More information about the MPlayer-dev-eng mailing list