mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed cRecording::LengthInSeconds(), which wrongfully rounded the result to full minutes
This commit is contained in:
parent
fbe4f2a056
commit
9e7a2134b4
@ -2268,6 +2268,8 @@ Christoph Haubrich <christoph1.haubrich@arcor.de>
|
|||||||
index file
|
index file
|
||||||
for fixing setting the start time of an edited recording
|
for fixing setting the start time of an edited recording
|
||||||
for adding support for HbbTV to libsi
|
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>
|
Pekka Mauno <pekka.mauno@iki.fi>
|
||||||
for fixing cSchedule::GetFollowingEvent() in case there is currently no present
|
for fixing cSchedule::GetFollowingEvent() in case there is currently no present
|
||||||
|
4
HISTORY
4
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
|
- Fixed frozen live view with device bonding in case the bonded master is used for
|
||||||
live viewing (reported by Uwe Scheffler).
|
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).
|
- Updated the Italian OSD texts (thanks to Diego Pierotto).
|
||||||
- Revoked "Fixed handling symbolic links in cRecordings::ScanVideoDir()".
|
- 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 the return type of cMyDeviceHook::DeviceProvidesTransponder() in PLUGINS.html.
|
||||||
- Fixed a crash in a plugin using cDeviceHook when VDR ends (reported by Oliver Endriss).
|
- Fixed a crash in a plugin using cDeviceHook when VDR ends (reported by Oliver Endriss).
|
||||||
- Some improvements to the Makefiles (thanks to Christian Ruppert).
|
- Some improvements to the Makefiles (thanks to Christian Ruppert).
|
||||||
|
- Fixed cRecording::LengthInSeconds(), which wrongfully rounded the result to full
|
||||||
|
minutes (thanks to Christoph Haubrich).
|
||||||
|
10
recording.c
10
recording.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "recording.h"
|
||||||
@ -875,11 +875,11 @@ const char *cRecording::Title(char Delimiter, bool NewIndicator, int Level) cons
|
|||||||
s = name;
|
s = name;
|
||||||
cString Length("");
|
cString Length("");
|
||||||
if (NewIndicator) {
|
if (NewIndicator) {
|
||||||
int Seconds = max(0, LengthInSeconds());
|
int Minutes = max(0, (LengthInSeconds() + 30) / 60);
|
||||||
Length = cString::sprintf("%c%d:%02d",
|
Length = cString::sprintf("%c%d:%02d",
|
||||||
Delimiter,
|
Delimiter,
|
||||||
Seconds / 3600,
|
Minutes / 60,
|
||||||
Seconds / 60 % 60
|
Minutes % 60
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
titleBuffer = strdup(cString::sprintf("%02d.%02d.%02d%c%02d:%02d%s%c%c%s",
|
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();
|
int nf = NumFrames();
|
||||||
if (nf >= 0)
|
if (nf >= 0)
|
||||||
return int((nf / FramesPerSecond() + 30) / 60) * 60;
|
return int(nf / FramesPerSecond());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user