summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY4
-rw-r--r--recording.c10
3 files changed, 10 insertions, 6 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 586e8a54..9ba9c0fa 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2268,6 +2268,8 @@ Christoph Haubrich <christoph1.haubrich@arcor.de>
index file
for fixing setting the start time of an edited recording
for adding support for HbbTV to libsi
+ for fixing cRecording::LengthInSeconds(), which wrongfully rounded the result to full
+ minutes
Pekka Mauno <pekka.mauno@iki.fi>
for fixing cSchedule::GetFollowingEvent() in case there is currently no present
diff --git a/HISTORY b/HISTORY
index ce99e189..a24ccacc 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6836,7 +6836,7 @@ Video Disk Recorder Revision History
- Fixed frozen live view with device bonding in case the bonded master is used for
live viewing (reported by Uwe Scheffler).
-2012-01-18: Version 1.7.24
+2012-01-25: Version 1.7.24
- Updated the Italian OSD texts (thanks to Diego Pierotto).
- Revoked "Fixed handling symbolic links in cRecordings::ScanVideoDir()".
@@ -6850,3 +6850,5 @@ Video Disk Recorder Revision History
- Fixed the return type of cMyDeviceHook::DeviceProvidesTransponder() in PLUGINS.html.
- Fixed a crash in a plugin using cDeviceHook when VDR ends (reported by Oliver Endriss).
- Some improvements to the Makefiles (thanks to Christian Ruppert).
+- Fixed cRecording::LengthInSeconds(), which wrongfully rounded the result to full
+ minutes (thanks to Christoph Haubrich).
diff --git a/recording.c b/recording.c
index 63caaf53..0d47d3f9 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 2.44 2012/01/16 12:05:41 kls Exp $
+ * $Id: recording.c 2.45 2012/01/25 09:32:39 kls Exp $
*/
#include "recording.h"
@@ -875,11 +875,11 @@ const char *cRecording::Title(char Delimiter, bool NewIndicator, int Level) cons
s = name;
cString Length("");
if (NewIndicator) {
- int Seconds = max(0, LengthInSeconds());
+ int Minutes = max(0, (LengthInSeconds() + 30) / 60);
Length = cString::sprintf("%c%d:%02d",
Delimiter,
- Seconds / 3600,
- Seconds / 60 % 60
+ Minutes / 60,
+ Minutes % 60
);
}
titleBuffer = strdup(cString::sprintf("%02d.%02d.%02d%c%02d:%02d%s%c%c%s",
@@ -1059,7 +1059,7 @@ int cRecording::LengthInSeconds(void) const
{
int nf = NumFrames();
if (nf >= 0)
- return int((nf / FramesPerSecond() + 30) / 60) * 60;
+ return int(nf / FramesPerSecond());
return -1;
}