diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-01-25 09:34:24 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-01-25 09:34:24 +0100 |
commit | 9e7a2134b4398d2b7851d4f7e2ad888bc04bfb42 (patch) | |
tree | bfcd78c14529c8bd2229123cecbe9486aaf84fce /recording.c | |
parent | fbe4f2a0568a1bf893f2bf970edcbb3d345e5db5 (diff) | |
download | vdr-9e7a2134b4398d2b7851d4f7e2ad888bc04bfb42.tar.gz vdr-9e7a2134b4398d2b7851d4f7e2ad888bc04bfb42.tar.bz2 |
Fixed cRecording::LengthInSeconds(), which wrongfully rounded the result to full minutes
Diffstat (limited to 'recording.c')
-rw-r--r-- | recording.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |