# HG changeset patch # User reimar # Date 1270495915 0 # Node ID 9bab99cfdff2c2907fd6f62b5bc6ba8f972d23c3 # Parent 959d06beb60869cb332bb21dea9826d6dcb0e038 Try to fix VCD compilation on non-Linux systems. diff -r 959d06beb608 -r 9bab99cfdff2 stream/stream_vcd.c --- a/stream/stream_vcd.c Mon Apr 05 17:15:08 2010 +0000 +++ b/stream/stream_vcd.c Mon Apr 05 19:31:55 2010 +0000 @@ -99,7 +99,7 @@ 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 -r 959d06beb608 -r 9bab99cfdff2 stream/vcd_read.h --- a/stream/vcd_read.h Mon Apr 05 17:15:08 2010 +0000 +++ b/stream/vcd_read.h Mon Apr 05 19:31:55 2010 +0000 @@ -145,6 +145,11 @@ 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 -r 959d06beb608 -r 9bab99cfdff2 stream/vcd_read_darwin.h --- a/stream/vcd_read_darwin.h Mon Apr 05 17:15:08 2010 +0000 +++ b/stream/vcd_read_darwin.h Mon Apr 05 19:31:55 2010 +0000 @@ -208,6 +208,11 @@ 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 -r 959d06beb608 -r 9bab99cfdff2 stream/vcd_read_fbsd.h --- a/stream/vcd_read_fbsd.h Mon Apr 05 17:15:08 2010 +0000 +++ b/stream/vcd_read_fbsd.h Mon Apr 05 19:31:55 2010 +0000 @@ -212,6 +212,11 @@ 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 -r 959d06beb608 -r 9bab99cfdff2 stream/vcd_read_os2.h --- a/stream/vcd_read_os2.h Mon Apr 05 17:15:08 2010 +0000 +++ b/stream/vcd_read_os2.h Mon Apr 05 19:31:55 2010 +0000 @@ -188,6 +188,11 @@ 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 -r 959d06beb608 -r 9bab99cfdff2 stream/vcd_read_win32.h --- a/stream/vcd_read_win32.h Mon Apr 05 17:15:08 2010 +0000 +++ b/stream/vcd_read_win32.h Mon Apr 05 19:31:55 2010 +0000 @@ -132,6 +132,11 @@ 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;