From 2ea3b5fdb0592f4fbe9cc20a9046b6c092903a6d Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 29 Jul 2007 15:37:30 +0000 Subject: [PATCH] Make VCD work on little-endian macs git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23916 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/vcd_read_darwin.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stream/vcd_read_darwin.h b/stream/vcd_read_darwin.h index 9eb3e9662a..0a54731d80 100644 --- a/stream/vcd_read_darwin.h +++ b/stream/vcd_read_darwin.h @@ -4,6 +4,7 @@ #include #include #include +#include "mpbswap.h" //=================== VideoCD ========================== #define CDROM_LEADOUT 0xAA @@ -56,7 +57,7 @@ int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track) mp_msg(MSGT_STREAM,MSGL_ERR,"ioctl dif1: %s\n",strerror(errno)); return -1; } - vcd->msf = CDConvertLBAToMSF(entry.trackStartAddress); + vcd->msf = CDConvertLBAToMSF(be2me_32(entry.trackStartAddress)); return VCD_SECTOR_DATA*vcd_get_msf(vcd); } @@ -90,7 +91,7 @@ int vcd_get_track_end(mp_vcd_priv_t* vcd, int track) mp_msg(MSGT_STREAM,MSGL_ERR,"ioctl dif2: %s\n",strerror(errno)); return -1; } - vcd->msf = CDConvertLBAToMSF(entry.trackStartAddress); + vcd->msf = CDConvertLBAToMSF(be2me_32(entry.trackStartAddress)); return VCD_SECTOR_DATA*vcd_get_msf(vcd); } @@ -134,7 +135,7 @@ mp_vcd_priv_t* vcd_read_toc(int fd) return NULL; } - trackMSF = CDConvertLBAToMSF(entry.trackStartAddress); + trackMSF = CDConvertLBAToMSF(be2me_32(entry.trackStartAddress)); //mp_msg(MSGT_OPEN,MSGL_INFO,"track %02d: adr=%d ctrl=%d format=%d %02d:%02d:%02d\n", if (i<=hdr.lastTrackNumberInLastSessionLSB)