1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed the validity check for channel IDs, because some providers use TIDs with value 0

This commit is contained in:
Klaus Schmidinger 2004-02-08 12:22:24 +01:00
parent acc25ade19
commit 1a91d46cf3
3 changed files with 8 additions and 2 deletions

View File

@ -929,3 +929,7 @@ Jens Rosenboom <me@jayr.de>
Andreas Regel <andreas.regel@gmx.de> Andreas Regel <andreas.regel@gmx.de>
for fixing handling bitmap indexes for 256 color mode for fixing handling bitmap indexes for 256 color mode
Thomas Bergwinkl <Thomas.Bergwinkl@t-online.de>
for fixing the validity check for channel IDs, because some providers use TIDs
with value 0

View File

@ -2642,3 +2642,5 @@ Video Disk Recorder Revision History
Volkenandt for his support in debugging this one). This may slow down switching Volkenandt for his support in debugging this one). This may slow down switching
between channels on different transponders for now, but a better solution will between channels on different transponders for now, but a better solution will
come later. come later.
- Fixed the validity check for channel IDs, because some providers use TIDs with
value 0 (thanks to Thomas Bergwinkl).

View File

@ -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: channels.h 1.14 2004/02/07 22:04:26 kls Exp $ * $Id: channels.h 1.15 2004/02/08 12:20:22 kls Exp $
*/ */
#ifndef __CHANNELS_H #ifndef __CHANNELS_H
@ -59,7 +59,7 @@ public:
tChannelID(void) { source = nid = tid = sid = rid = 0; } tChannelID(void) { source = nid = tid = sid = rid = 0; }
tChannelID(int Source, int Nid, int Tid, int Sid, int Rid = 0) { source = Source; nid = Nid; tid = Tid; sid = Sid; rid = Rid; } tChannelID(int Source, int Nid, int Tid, int Sid, int Rid = 0) { source = Source; nid = Nid; tid = Tid; sid = Sid; rid = Rid; }
bool operator== (const tChannelID &arg) const; bool operator== (const tChannelID &arg) const;
bool Valid(void) { return tid && sid; } // nid and rid are optional and source may be 0//XXX source may not be 0??? bool Valid(void) { return (nid || tid) && sid; } // rid is optional and source may be 0//XXX source may not be 0???
tChannelID &ClrRid(void) { rid = 0; return *this; } tChannelID &ClrRid(void) { rid = 0; return *this; }
static tChannelID FromString(const char *s); static tChannelID FromString(const char *s);
const char *ToString(void); const char *ToString(void);