summaryrefslogtreecommitdiffstats
path: root/stream/vcd_read_darwin.h
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-07-29 15:37:30 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-07-29 15:37:30 +0000
commit2ea3b5fdb0592f4fbe9cc20a9046b6c092903a6d (patch)
treed81eb14b1ef8c7ac3bfbbbd495d79039195d14aa /stream/vcd_read_darwin.h
parent1c67c05e8cc1f94c52f13c408db229cfae1ccd04 (diff)
downloadmpv-2ea3b5fdb0592f4fbe9cc20a9046b6c092903a6d.tar.bz2
mpv-2ea3b5fdb0592f4fbe9cc20a9046b6c092903a6d.tar.xz
Make VCD work on little-endian macs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23916 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/vcd_read_darwin.h')
-rw-r--r--stream/vcd_read_darwin.h7
1 files 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 <IOKit/storage/IOCDTypes.h>
#include <IOKit/storage/IOCDMedia.h>
#include <IOKit/storage/IOCDMediaBSDClient.h>
+#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)