Mercurial > mplayer.hg
changeset 23852:5982ecb1dcdf
vcd_inc_msf function also for freebsd vcd_read
author | reimar |
---|---|
date | Fri, 27 Jul 2007 16:34:52 +0000 |
parents | 6dbeddab0b45 |
children | 565d08e0ee51 |
files | stream/vcd_read_fbsd.h |
diffstat | 1 files changed, 15 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/vcd_read_fbsd.h Fri Jul 27 08:49:14 2007 +0000 +++ b/stream/vcd_read_fbsd.h Fri Jul 27 16:34:52 2007 +0000 @@ -29,6 +29,20 @@ 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 @@ 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; }