From d62bef6ee5723c514d281eb3db301d0cea5042cd Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 5 Apr 2010 19:31:55 +0000 Subject: Try to fix VCD compilation on non-Linux systems. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31023 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream_vcd.c | 2 +- stream/vcd_read.h | 5 +++++ stream/vcd_read_darwin.h | 5 +++++ stream/vcd_read_fbsd.h | 5 +++++ stream/vcd_read_os2.h | 5 +++++ stream/vcd_read_win32.h | 5 +++++ 6 files changed, 26 insertions(+), 1 deletion(-) (limited to 'stream') diff --git a/stream/stream_vcd.c b/stream/stream_vcd.c index 08ae9b4de3..22f05c21e7 100644 --- a/stream/stream_vcd.c +++ b/stream/stream_vcd.c @@ -99,7 +99,7 @@ static int control(stream_t *stream, int cmd, void *arg) { mp_vcd_priv_t *vcd = vcd_read_toc(stream->fd); if (!vcd) break; - *(unsigned int *)arg = vcd->tochdr.cdth_trk1; + *(unsigned int *)arg = vcd_end_track(vcd); return STREAM_OK; } case STREAM_CTRL_SEEK_TO_CHAPTER: diff --git a/stream/vcd_read.h b/stream/vcd_read.h index 2911186d20..cb4ac21ee6 100644 --- a/stream/vcd_read.h +++ b/stream/vcd_read.h @@ -145,6 +145,11 @@ static mp_vcd_priv_t* vcd_read_toc(int fd){ return vcd; } +static int vcd_end_track(mp_vcd_priv_t* vcd) +{ + return vcd->tochdr.cdth_trk1; +} + static int vcd_read(mp_vcd_priv_t* vcd,char *mem){ #if defined(__linux__) || defined(__bsdi__) memcpy(vcd->buf,&vcd->entry.cdte_addr.msf,sizeof(struct cdrom_msf)); diff --git a/stream/vcd_read_darwin.h b/stream/vcd_read_darwin.h index 20f1782049..927b659871 100644 --- a/stream/vcd_read_darwin.h +++ b/stream/vcd_read_darwin.h @@ -208,6 +208,11 @@ static mp_vcd_priv_t* vcd_read_toc(int fd) return vcd; } +static int vcd_end_track(mp_vcd_priv_t* vcd) +{ + return vcd->hdr.lastTrackNumberInLastSessionLSB; +} + static int vcd_read(mp_vcd_priv_t* vcd,char *mem) { if (pread(vcd->fd,&vcd->buf,VCD_SECTOR_SIZE,vcd_get_msf(vcd)*VCD_SECTOR_SIZE) != VCD_SECTOR_SIZE) diff --git a/stream/vcd_read_fbsd.h b/stream/vcd_read_fbsd.h index a9555f5b9e..601919f0f3 100644 --- a/stream/vcd_read_fbsd.h +++ b/stream/vcd_read_fbsd.h @@ -212,6 +212,11 @@ vcd_read_toc(int fd) return vcd; } +static int vcd_end_track(mp_vcd_priv_t* vcd) +{ + return vcd->tochdr.ending_track; +} + static int vcd_read(mp_vcd_priv_t* vcd, char *mem) { diff --git a/stream/vcd_read_os2.h b/stream/vcd_read_os2.h index 7d37b33e23..0585d1d7d0 100644 --- a/stream/vcd_read_os2.h +++ b/stream/vcd_read_os2.h @@ -188,6 +188,11 @@ static mp_vcd_priv_t *vcd_read_toc(int fd) return vcd; } +static int vcd_end_track(mp_vcd_priv_t* vcd) +{ + return vcd->iLastTrack; +} + static int vcd_read(mp_vcd_priv_t *vcd, char *mem) { struct { diff --git a/stream/vcd_read_win32.h b/stream/vcd_read_win32.h index 3b93a76b0a..0cdaea115f 100644 --- a/stream/vcd_read_win32.h +++ b/stream/vcd_read_win32.h @@ -132,6 +132,11 @@ static mp_vcd_priv_t* vcd_read_toc(int fd) return vcd; } +static int vcd_end_track(mp_vcd_priv_t* vcd) +{ + return vcd->toc.LastTrack; +} + static int vcd_read(mp_vcd_priv_t* vcd, char *mem) { DWORD dwBytesReturned; -- cgit v1.2.3