diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2014-02-08 10:57:26 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2014-02-08 10:57:26 +0100 |
commit | 1ae32cdd6f304fdd5758c51614c8da87ff0abb6e (patch) | |
tree | 1275332a08a618252bbde8c3481dd0fb58894d16 /recording.c | |
parent | fb66c3ec6b9a5d5e9211d46b7b030d55a3d02c05 (diff) | |
download | vdr-1ae32cdd6f304fdd5758c51614c8da87ff0abb6e.tar.gz vdr-1ae32cdd6f304fdd5758c51614c8da87ff0abb6e.tar.bz2 |
Revoked 'Fixed numbering frames' to not break compatibility within the stable 2.0.x
Diffstat (limited to 'recording.c')
-rw-r--r-- | recording.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/recording.c b/recording.c index a35d0ee6..19efa42e 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.91.1.5 2014/02/06 11:04:03 kls Exp $ + * $Id: recording.c 2.91.1.6 2014/02/08 10:57:26 kls Exp $ */ #include "recording.h" @@ -2394,7 +2394,7 @@ cString IndexToHMSF(int Index, bool WithFrame, double FramesPerSecond) Sign = "-"; } double Seconds; - int f = int(modf((Index + 0.5) / FramesPerSecond, &Seconds) * FramesPerSecond); + int f = int(modf((Index + 0.5) / FramesPerSecond, &Seconds) * FramesPerSecond + 1); int s = int(Seconds); int m = s / 60 % 60; int h = s / 3600; @@ -2407,9 +2407,9 @@ int HMSFToIndex(const char *HMSF, double FramesPerSecond) int h, m, s, f = 1; int n = sscanf(HMSF, "%d:%d:%d.%d", &h, &m, &s, &f); if (n == 1) - return h; // plain frame number + return h - 1; // plain frame number if (n >= 3) - return int(round((h * 3600 + m * 60 + s) * FramesPerSecond)) + f; + return int(round((h * 3600 + m * 60 + s) * FramesPerSecond)) + f - 1; return 0; } |