From 421d737cabfd96625b708dbad097d070cd69c7d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 4 Apr 2012 23:33:34 +0300 Subject: Fix build with VDR 1.7.27. --- common.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'common.c') diff --git a/common.c b/common.c index fe9c98f..5a8c9c9 100644 --- a/common.c +++ b/common.c @@ -255,11 +255,19 @@ int GetRecordingCuttedLength(const char *FileName, double FramesPerSecond, bool int start = 1; // first frame bool isStart = true; +#if APIVERSNUM >= 10721 + for (cMark *m = marks.First(); m; m = marks.GetNext(m->Position())) { + if (isStart) + start = m->Position(); + else + length += (double)(m->Position() - start + 1 + diffIFrame) / (60 * FramesPerSecond); // [min] +#else for (cMark *m = marks.First(); m; m = marks.GetNext(m->position)) { if (isStart) start = m->position; else length += (double)(m->position - start + 1 + diffIFrame) / (60 * FramesPerSecond); // [min] +#endif isStart = !isStart; } -- cgit v1.2.3