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

Alex Beregszaszi alex at galaktik.hu
Wed Aug 28 21:19:16 CEST 2002


On Wed, 28 Aug 2002 20:57:04 +0200
Hi,

> > > 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.
> 
> Without the check, if a file was opened between audio_pause() and
> audio_resume(), it could get the same fd as audio_fd, and be closed
> accidentally on resume. Maybe that is causing the crashes.
Okay guys, Arpi said that I should commit your version and I see it safer
too. It's done now.

P.S.: Please later send patches as attachments.

-- 
Alex Beregszaszi  <alex at naxine.org>



More information about the MPlayer-dev-eng mailing list