[MPlayer-cvslog] r23872 - trunk/stream/vcd_read_fbsd.h
reimar
subversion at mplayerhq.hu
Fri Jul 27 18:34:52 CEST 2007
Author: reimar
Date: Fri Jul 27 18:34:52 2007
New Revision: 23872
Log:
vcd_inc_msf function also for freebsd vcd_read
Modified:
trunk/stream/vcd_read_fbsd.h
Modified: trunk/stream/vcd_read_fbsd.h
==============================================================================
--- trunk/stream/vcd_read_fbsd.h (original)
+++ trunk/stream/vcd_read_fbsd.h Fri Jul 27 18:34:52 2007
@@ -29,6 +29,20 @@ vcd_set_msf(mp_vcd_priv_t* vcd, unsigned
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;
}
More information about the MPlayer-cvslog
mailing list