summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'common.c')
-rw-r--r--common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common.c b/common.c
index 8b03502..431600a 100644
--- a/common.c
+++ b/common.c
@@ -36,8 +36,13 @@ GLCD::cType DurationType(int Index, const std::string &Format)
char *res = result;
enum { normal, format } state = normal;
int n = 0;
+#if VDRVERSNUM >= 10701
+ int f = (Index % DEFAULTFRAMESPERSECOND) + 1;
+ int s = (Index / DEFAULTFRAMESPERSECOND);
+#else
int f = (Index % FRAMESPERSEC) + 1;
int s = (Index / FRAMESPERSEC);
+#endif
int m = s / 60 % 60;
int h = s / 3600;
s %= 60;