diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-07-27 16:34:52 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-07-27 16:34:52 +0000 |
commit | 37c39a9f74ee382f8b3817527af10b77c4351953 (patch) | |
tree | 4225724b4f4d5efe61a1847a4b66444a279f0c84 /stream | |
parent | 647514eb733393b0e58f68e731817ca870662e1f (diff) |
vcd_inc_msf function also for freebsd vcd_read
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23872 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r-- | stream/vcd_read_fbsd.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/stream/vcd_read_fbsd.h b/stream/vcd_read_fbsd.h index f0a6022384..22aa198086 100644 --- a/stream/vcd_read_fbsd.h +++ b/stream/vcd_read_fbsd.h @@ -29,6 +29,20 @@ vcd_set_msf(mp_vcd_priv_t* vcd, unsigned int sect) TOCADDR(vcd->entry).msf.minute = sect; } +static inline void +vcd_inc_msf(mp_vcd_priv_t* vcd) +{ + TOCADDR(vcd->entry).msf.frame++; + if (TOCADDR(vcd->entry).msf.frame==75){ + TOCADDR(vcd->entry).msf.frame=0; + TOCADDR(vcd->entry).msf.second++; + if (TOCADDR(vcd->entry).msf.second==60){ + TOCADDR(vcd->entry).msf.second=0; + TOCADDR(vcd->entry).msf.minute++; + } + } +} + static inline unsigned int vcd_get_msf(mp_vcd_priv_t* vcd) { @@ -136,15 +150,7 @@ 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) return 0; // EOF? - TOCADDR(vcd->entry).msf.frame++; - if (TOCADDR(vcd->entry).msf.frame==75){ - TOCADDR(vcd->entry).msf.frame=0; - TOCADDR(vcd->entry).msf.second++; - if (TOCADDR(vcd->entry).msf.second==60){ - TOCADDR(vcd->entry).msf.second=0; - TOCADDR(vcd->entry).msf.minute++; - } - } + vcd_inc_msf(vcd); memcpy(mem,vcd->buf.data,VCD_SECTOR_DATA); return VCD_SECTOR_DATA; } |