[MPlayer-dev-eng] [PATCH] ao_oss.c: Re-Open device on pause with O_NONBLOCK

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Sep 25 20:42:17 CEST 2006


Hello,
On Mon, Sep 25, 2006 at 12:04:42PM -0400, Rich Felker wrote:
> On Mon, Sep 25, 2006 at 05:26:50PM +0200, Fabian Franz wrote:
> > MPlayer does not re-open the oss device with O_NONBLOCK. The patch fixes that.
> > 
> > This bug has been there since 2002. Why now that patch?
> > 
> > Well, I've written a blocking implementation of esddsp and I just can't tell 
> > that the output should be non-blocking if this flag is not set ...
> > 
> > And there might be even soundcards out there having the same problem ...
> 
> I suspect you're grossly misusing the O_NONBLOCK flag in your
> implementation. MPlayer does not want nonblocking mode. Nonblocking
> means that the write will FAIL if the buffer is full, whereas MPlayer
> wants to block if and only if the buffer is full, AFAIK. Blocking on
> writes when the buffer is not full is an incorrect implementation.

Well, regardless in init O_NONBLOCK is used, so the same code should be
used in reset. So okay to apply?

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list