diff options
-rw-r--r-- | src/DSUtil/DSUtil.cpp | 8 | ||||
-rw-r--r-- | src/DSUtil/DSUtil.h | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/DSUtil/DSUtil.cpp b/src/DSUtil/DSUtil.cpp index 365d183c4..8d261eb21 100644 --- a/src/DSUtil/DSUtil.cpp +++ b/src/DSUtil/DSUtil.cpp @@ -874,7 +874,7 @@ bool GetKeyFrames(CString fn, CUIntArray& kfs) return !kfs.IsEmpty();
}
-DVD_HMSF_TIMECODE RT2HMSF(REFERENCE_TIME rt, double fps) // use to remember the current position
+DVD_HMSF_TIMECODE RT2HMSF(REFERENCE_TIME rt, double fps /*= 0.0*/) // use to remember the current position
{
DVD_HMSF_TIMECODE hmsf = {
(BYTE)((rt / 10000000 / 60 / 60)),
@@ -899,11 +899,11 @@ DVD_HMSF_TIMECODE RT2HMS_r(REFERENCE_TIME rt) // used only for information (for return hmsf;
}
-REFERENCE_TIME HMSF2RT(DVD_HMSF_TIMECODE hmsf, double fps)
+REFERENCE_TIME HMSF2RT(DVD_HMSF_TIMECODE hmsf, double fps /*= -1.0*/)
{
- if (fps == 0) {
+ if (fps <= 0.0) {
hmsf.bFrames = 0;
- fps = 1;
+ fps = 1.0;
}
return (REFERENCE_TIME)((((REFERENCE_TIME)hmsf.bHours * 60 + hmsf.bMinutes) * 60 + hmsf.bSeconds) * 1000 + 1.0 * hmsf.bFrames * 1000 / fps) * 10000;
}
diff --git a/src/DSUtil/DSUtil.h b/src/DSUtil/DSUtil.h index 0d9c85de2..4cd381a81 100644 --- a/src/DSUtil/DSUtil.h +++ b/src/DSUtil/DSUtil.h @@ -76,9 +76,9 @@ typedef enum { extern OpticalDiskType_t GetOpticalDiskType(TCHAR drive, CAtlList<CString>& files);
extern CString GetDriveLabel(TCHAR drive);
extern bool GetKeyFrames(CString fn, CUIntArray& kfs);
-extern DVD_HMSF_TIMECODE RT2HMSF(REFERENCE_TIME rt, double fps = 0); // used to remember the current position
-extern DVD_HMSF_TIMECODE RT2HMS_r(REFERENCE_TIME rt); // used only for information (for display on the screen)
-extern REFERENCE_TIME HMSF2RT(DVD_HMSF_TIMECODE hmsf, double fps = 0);
+extern DVD_HMSF_TIMECODE RT2HMSF(REFERENCE_TIME rt, double fps = 0.0); // used to remember the current position
+extern DVD_HMSF_TIMECODE RT2HMS_r(REFERENCE_TIME rt); // used only to display information with rounding to nearest second
+extern REFERENCE_TIME HMSF2RT(DVD_HMSF_TIMECODE hmsf, double fps = -1.0);
extern void memsetd(void* dst, unsigned int c, size_t nbytes);
extern void memsetw(void* dst, unsigned short c, size_t nbytes);
extern bool ExtractBIH(const AM_MEDIA_TYPE* pmt, BITMAPINFOHEADER* bih);
|