summaryrefslogtreecommitdiff
path: root/macosx/plugins/DFCdrom
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/plugins/DFCdrom')
-rw-r--r--macosx/plugins/DFCdrom/macsrc/cdr-macosx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/macosx/plugins/DFCdrom/macsrc/cdr-macosx.c b/macosx/plugins/DFCdrom/macsrc/cdr-macosx.c
index 806b659a..c92156f4 100644
--- a/macosx/plugins/DFCdrom/macsrc/cdr-macosx.c
+++ b/macosx/plugins/DFCdrom/macsrc/cdr-macosx.c
@@ -182,6 +182,7 @@ long GetTE(unsigned char track, unsigned char *m, unsigned char *s, unsigned cha
long ReadSector(crdata *cr) {
int lba;
dk_cd_read_t r;
+ char buf[CD_FRAMESIZE_RAW];
if (cdHandle < 0) return -1;
@@ -193,12 +194,13 @@ long ReadSector(crdata *cr) {
r.sectorArea = 0xF8;
r.sectorType = kCDSectorTypeUnknown;
r.bufferLength = CD_FRAMESIZE_RAW;
- r.buffer = cr->buf;
+ r.buffer = buf; // ??? Why using cr->buf directly does not work in threaded mode?
if (ioctl(cdHandle, DKIOCCDREAD, &r) != kIOReturnSuccess) {
return -1;
}
+ memcpy(cr->buf, buf, CD_FRAMESIZE_RAW);
return 0;
}