changeset 25376:382aeacc771f

The buffer used for pread need be aligned, but currently it got an offset 23 to the structure head. This will cause the pread always got random data on some machines (such as my iMac G5 PPC with 10.5 os) so can not play vcd. I also tried use DKIOCCDREAD ioctl call, but the result is same -- buffer need be aligned. It could be a bug of os x or its dev lib. Now fix this problem by move the buffer to a good aligned position in structure.
author ulion
date Sat, 15 Dec 2007 12:17:51 +0000
parents e1884244ba98
children 31e0937ebe38
files stream/vcd_read_darwin.h
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/stream/vcd_read_darwin.h	Sat Dec 15 12:11:44 2007 +0000
+++ b/stream/vcd_read_darwin.h	Sat Dec 15 12:17:51 2007 +0000
@@ -21,9 +21,9 @@
 typedef struct mp_vcd_priv_st
 {
 	int fd;
+	cdsector_t buf;
 	dk_cd_read_track_info_t entry;
 	CDMSF msf;
-	cdsector_t buf;
 } mp_vcd_priv_t;
 
 static inline void vcd_set_msf(mp_vcd_priv_t* vcd, unsigned int sect)