[Mplayer-cvslog] CVS: main/libmpdemux cdda.c,1.12,1.13
D Richard Felker III
dalias at aerifal.cx
Tue Dec 16 20:07:34 CET 2003
On Tue, Dec 16, 2003 at 08:35:29AM +0100, Colin Leroy CVS wrote:
> Update of /cvsroot/mplayer/main/libmpdemux
> In directory mail:/var/tmp.root/cvs-serv15160
>
> Modified Files:
> cdda.c
> Log Message:
> cdda: endianness fix
>
>
> Index: cdda.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libmpdemux/cdda.c,v
> retrieving revision 1.12
> retrieving revision 1.13
> diff -u -r1.12 -r1.13
> --- cdda.c 13 Aug 2003 11:18:24 -0000 1.12
> +++ cdda.c 16 Dec 2003 07:35:04 -0000 1.13
> @@ -5,6 +5,7 @@
> #include "stream.h"
> #include "../m_option.h"
> #include "../m_struct.h"
> +#include "../bswap.h"
>
> #include <stdio.h>
> #include <stdlib.h>
> @@ -253,6 +254,11 @@
> int i;
>
> buf = paranoia_read(p->cdp,cdparanoia_callback);
> +
> +#ifdef WORDS_BIGENDIAN
> + for(i=0;i<CD_FRAMESIZE_RAW/2;i++)
> + buf[i]=le2me_16(buf[i]);
> +#endif
Why not just flag the output as big endian and let the audio filter
layer convert it if needed? This would be a much cleaner approach,
imo.
Rich
More information about the MPlayer-cvslog
mailing list