[MPlayer-dev-eng] [PATCH] Updated JACK audio output driver

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Jun 22 11:29:11 CEST 2004


Hi,

> +static int init(int rate_hz, int channels, int format, int flags)
> +{
> +	int err, m, frag_spec;
> +	unsigned long *rate = NULL;
> +	unsigned int bits_per_sample;
...
...
...
> +	rate = (unsigned long *)&rate_hz;
> +	
> +	err = JACK_Open(&driver, bits_per_sample, rate,	channels);

This is wrong! You can't just cast to (unsigned long *)! When int!=long, 
this will overwrite the data behinde rate_hz and won't work at all on 
big-endian! Don't make rate a pointer!

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list