[MPlayer-dev-eng] [PATCH] stream_cdda seek to end fix

Alban Bedel albeu at free.fr
Wed Dec 12 19:45:07 CET 2007


On Wed, 12 Dec 2007 14:32:47 +0100
Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:

> Hello,
> On Wed, Dec 12, 2007 at 09:17:05PM +0800, Ulion wrote:
> > It seems rare people use mplayer to play cd, stream_cdda can not
> > even seek to end, it hangs with 'Track 1' printed in verbose output,
> > indeed, that's the default value of variable seeked_track, but
> > sector is already out of tha end_sector. Here's a patch for it.
> 
> Shouldn't it better instead handle the seek error properly? If it
> hangs like this I'd assume it will hang the same way e.g. with a
> scratched CD..
> And even if this is the best solution, preferably any code that can
> cause hangs should be eliminated (I have a similar problem with the TV
> code, if the reception is bad MPlayer can hang for several minutes
> before reacting to input, though some of it might be because (AFAICT)
> simply all TV-related kernel-drivers are full of bugs).

I dunno for tv drivers, but that's probably similar, read() just block
by default. One should instead use select() and non blocking read.
That's doable for all the stuff we implemented ourself (and some
already do iirc), but for stuff using external libs we are stuck.

	Albeu

PS: Afaik select() support is very poor (or even inexistant!) in many
v4l drivers. In an app of mine, where blocking read was just not an
option, I had no other choice than to fork a separate process for the
capture :(




More information about the MPlayer-dev-eng mailing list