diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2017-02-21 14:17:07 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2017-02-21 14:17:07 +0100 |
commit | 3f9cdea1c16cb25b7a3ce7c875d46e6d100d593d (patch) | |
tree | 20844e355df620ea67229a18b00212290f31c28d /receiver.c | |
parent | 71601e363e730bc073dcc435da8de1d0e3453436 (diff) | |
download | vdr-3f9cdea1c16cb25b7a3ce7c875d46e6d100d593d.tar.gz vdr-3f9cdea1c16cb25b7a3ce7c875d46e6d100d593d.tar.bz2 |
PIDs can now be added to and deleted from a cReceiver while it is attached to a cDevice
Diffstat (limited to 'receiver.c')
-rw-r--r-- | receiver.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: receiver.c 4.1 2015/09/16 11:19:47 kls Exp $ + * $Id: receiver.c 4.2 2017/02/21 10:59:27 kls Exp $ */ #include "receiver.h" @@ -38,8 +38,11 @@ bool cReceiver::AddPid(int Pid) { if (Pid) { if (numPids < MAXRECEIVEPIDS) { - if (!WantsPid(Pid)) + if (!WantsPid(Pid)) { pids[numPids++] = Pid; + if (device) + device->AddPid(Pid); + } } else { dsyslog("too many PIDs in cReceiver (Pid = %d)", Pid); @@ -87,6 +90,8 @@ void cReceiver::DelPid(int Pid) for ( ; i < numPids; i++) // we also copy the terminating 0! pids[i] = pids[i + 1]; numPids--; + if (device) + device->DelPid(Pid); return; } } |