changeset 23898:3a5f766397b5

Simplify and fix missing offset for Darwin vcd_get/set_msf functions
author reimar
date Sun, 29 Jul 2007 15:59:55 +0000
parents f4d419485f3e
children 34532db868ba
files stream/vcd_read_darwin.h
diffstat 1 files changed, 2 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/stream/vcd_read_darwin.h	Sun Jul 29 15:45:47 2007 +0000
+++ b/stream/vcd_read_darwin.h	Sun Jul 29 15:59:55 2007 +0000
@@ -28,18 +28,12 @@
 
 static inline void vcd_set_msf(mp_vcd_priv_t* vcd, unsigned int sect)
 {
-  vcd->msf.frame=sect%75;
-  sect=sect/75;
-  vcd->msf.second=sect%60;
-  sect=sect/60;
-  vcd->msf.minute=sect;
+  vcd->msf = CDConvertLBAToMSF(sect);
 }
 
 static inline unsigned int vcd_get_msf(mp_vcd_priv_t* vcd)
 {
-  return vcd->msf.frame +
-        (vcd->msf.second+
-         vcd->msf.minute*60)*75;
+  return CDConvertMSFToLBA(vcd->msf);
 }
 
 int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track)