[MPlayer-cvslog] r23916 - trunk/stream/vcd_read_darwin.h

reimar subversion at mplayerhq.hu
Sun Jul 29 17:37:30 CEST 2007


Author: reimar
Date: Sun Jul 29 17:37:30 2007
New Revision: 23916

Log:
Make VCD work on little-endian macs


Modified:
   trunk/stream/vcd_read_darwin.h

Modified: trunk/stream/vcd_read_darwin.h
==============================================================================
--- trunk/stream/vcd_read_darwin.h	(original)
+++ trunk/stream/vcd_read_darwin.h	Sun Jul 29 17:37:30 2007
@@ -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
 		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
 		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)



More information about the MPlayer-cvslog mailing list