mirror of
https://github.com/mpv-player/mpv
synced 2025-02-25 17:58:27 +00:00
Make VCD work on little-endian macs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23916 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
1c67c05e8c
commit
2ea3b5fdb0
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user