summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS3
-rw-r--r--HISTORY1
-rw-r--r--receiver.c8
3 files changed, 9 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 4d629256..ad1c3362 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -3429,3 +3429,6 @@ Janne Pänkälä <epankala@gmail.com>
Stefan Pöschel <basic.master@gmx.de>
for coding the AFFcleaner, parts of which were used to make the recorder skip empty
adaptation field TS packets
+
+Robert Hannebauer <vdr@hannebauer.org>
+ for fixing an overflow of PIDs in a receiver
diff --git a/HISTORY b/HISTORY
index 4e08a288..e9089d27 100644
--- a/HISTORY
+++ b/HISTORY
@@ -8831,3 +8831,4 @@ Video Disk Recorder Revision History
2015-09-16: Version 2.3.2
- Fixed a crash when deleting a recording (reported by Oliver Endriss).
+- Fixed an overflow of PIDs in a receiver (thanks to Robert Hannebauer).
diff --git a/receiver.c b/receiver.c
index d8f51e68..8d647c02 100644
--- a/receiver.c
+++ b/receiver.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: receiver.c 3.3 2015/01/12 14:04:31 kls Exp $
+ * $Id: receiver.c 4.1 2015/09/16 11:19:47 kls Exp $
*/
#include "receiver.h"
@@ -37,8 +37,10 @@ void cReceiver::SetPriority(int Priority)
bool cReceiver::AddPid(int Pid)
{
if (Pid) {
- if (numPids < MAXRECEIVEPIDS)
- pids[numPids++] = Pid;
+ if (numPids < MAXRECEIVEPIDS) {
+ if (!WantsPid(Pid))
+ pids[numPids++] = Pid;
+ }
else {
dsyslog("too many PIDs in cReceiver (Pid = %d)", Pid);
return false;