Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUnderground78 <underground78@users.sourceforge.net>2013-10-13 18:23:34 +0400
committerUnderground78 <underground78@users.sourceforge.net>2013-10-13 23:23:11 +0400
commit432a546360299019d8e019a24aecc3b4045142e8 (patch)
tree7ead7b1047d026b7053d597b227c9fb16a8a34fc /src
parent37e7fcab869a2fe7333deb6f6314214e6e6a1cb0 (diff)
DSUtil: Cosmetics.
Diffstat (limited to 'src')
-rw-r--r--src/DSUtil/DSUtil.cpp8
-rw-r--r--src/DSUtil/DSUtil.h6
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);