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

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Nov 17 01:46:42 CET 2007


Hello,
On Fri, Nov 16, 2007 at 09:30:58PM +0100, Sebastian Kemper wrote:
> attached patch fixes some glitches in dvd_set_speed() (stream_dvd.c).

Different issues must be fixed in separate patches.

> - 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).

> - 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)
> - add a check to make sure the device really is an SG device (taken from
>   sg_simple2.c)

Why?

>   I'm not sure you guys like the printf() but I don't really want to
>   dive into mplayer's message system

A patch with printf certainly won't be applied that way. And mp_msg is
printf just with 2 more parameters in front...

> - add close(fd)'s where feasible

Why not simply opening the fd right before it is used?

> - add a missing return

adding an else seems simpler (though it does not necessarily look
nicer).

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list