[MPlayer-dev-eng] [Patch 1/2] dvd_set_speed fixes/addons

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Nov 17 13:30:49 CET 2007


On Sat, Nov 17, 2007 at 01:06:33PM +0100, Sebastian Kemper wrote:
> On Sat, Nov 17, 2007 at 01:46:42AM +0100, Reimar Döffinger wrote:
> > > - unsigned speed to int speed (because restoring the initial speed means
> > >   to set speed=-1)
> > 
> > Any reason to do the except out of principle? Because then the less
> > complex fix is to replace the -1 by ~0 (which is somewhat pointless as well).
> 
> I don't think it's _that_ complex ;) And 0 already has a meaning for
> dvd_set_speed() (do nothing and exit right away). (Maybe I'm misreading
> your ~0, though -- you did mean 0, right?)

No, I meant the bit-wise not of 0, i.e. all bits 1. Which happens to be
the same as -1 usually.

> > > - use the correct ATAPI command length for SET STREAMING (12 bytes); at
> > >   least libata (for now anyways) won't let commands through when the
> > >   command length is wrong ("old" ATA is more forgiving and cuts the last
> > >   4 bytes)
> 
> BTW of course this was the main reason to write the patch at all. See
> http://marc.info/?l=linux-kernel&m=119497215212990&w=2

And that is also the least disputed part of it, I'll just have to test
it.
Nico, this is your code, do you want to look at it or may I feel free to
mess with it as I like (e.g. moving the checks and open further down,
moving the speed *= 1350 into the default case, using AV_WB32 to write
the speed into the buffer or at least remove the completely pointless
"& 0xff" etc.)?

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list