Fixed handling negative values in cSource::Position() on systems where 'int' is 64 bit

This commit is contained in:
Klaus Schmidinger 2024-10-09 10:36:16 +02:00
parent 2dacc776bd
commit 2bcd8ba8f3
3 changed files with 9 additions and 6 deletions

View File

@ -2585,6 +2585,8 @@ Markus Ehrnsperger <markus.ehrnsperger@googlemail.com>
was no event with RunningStatus() >= SI::RunningStatusPausing
for reporting problem with duplicate events if they are moved to a lower table ID and
at the same time get a new event ID
for reporting a bug in handling negative values in cSource::Position() on
systems where 'int' is 64 bit
Werner Färber <w.faerber@gmx.de>
for reporting a bug in handling the cPluginManager::Active() result when pressing
@ -2847,6 +2849,8 @@ Winfried K
for reporting a compiler warning with gcc 14.1.0
for suggesting to remove defining DEPRECATED_* macros with value 0, because this
is the preprocessor's default
for suggesting a fix for handling negative values in cSource::Position() on
systems where 'int' is 64 bit
Hans-Werner Hilse <hilse@web.de>
for adding the command line option --userdump to enable core dumps in case VDR

View File

@ -10021,8 +10021,10 @@ Video Disk Recorder Revision History
- Fixed a problem with duplicate events if they are moved to a lower table ID and at the
same time get a new event ID (reported by Markus Ehrnsperger).
2024-10-08:
2024-10-09:
- Removed defining DEPRECATED_* macros with value 0, because this is the preprocessor's
default (suggested by Winfried Köhler).
- Fixed error checking in case of large PTS discontinuities (reported by Matthias Senzel).
- Fixed handling negative values in cSource::Position() on systems where 'int' is 64 bit
(reported by Markus Ehrnsperger, fix suggested by Winfried Köhler).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: sources.c 3.6 2014/03/09 12:05:42 kls Exp $
* $Id: sources.c 5.1 2024/10/09 10:36:16 kls Exp $
*/
#include "sources.h"
@ -46,10 +46,7 @@ bool cSource::Matches(int Code1, int Code2)
int cSource::Position(int Code)
{
int n = (Code & st_Pos);
if (n > 0x00007FFF)
n |= 0xFFFF0000;
return n;
return int16_t(Code & st_Pos);
}
cString cSource::ToString(int Code)