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

fix addpid

This commit is contained in:
Ralph Metzler 2016-11-17 16:35:33 +01:00
parent 3d45ccf6fc
commit a0e2ee78dc

View File

@ -1426,20 +1426,22 @@ static int merge_pids(struct dvb_params *op, struct dvb_params *p)
{ {
int i, r = 0; int i, r = 0;
dbgprintf(DEBUG_SYS, "merge_pids\n");
if (p->set & (1UL << PARAM_PID)) if (p->set & (1UL << PARAM_PID))
for (i = 0 ; i < 1024 ; i++) for (i = 0; i < 1024; i++)
if (op->pid[i] != p->pid[i]) { if (op->pid[i] != p->pid[i]) {
r |= 1; r |= 1;
op->pid[i] = p->pid[i]; op->pid[i] = p->pid[i];
} }
if (p->set & (1UL << PARAM_APID)) if (p->set & (1UL << PARAM_APID))
for (i = 0 ; i < 1024 ; i++) for (i = 0; i < 1024; i++)
if (!(op->pid[i] & p->pid[i])) { if ((~op->pid[i]) & p->pid[i]) {
r |= 2; r |= 2;
op->pid[i] |= p->pid[i]; op->pid[i] |= p->pid[i];
} }
if (p->set & (1UL << PARAM_DPID)) if (p->set & (1UL << PARAM_DPID))
for (i = 0 ; i < 1024 ; i++) for (i = 0; i < 1024; i++)
if (op->pid[i] & p->dpid[i]) { if (op->pid[i] & p->dpid[i]) {
r |= 4; r |= 4;
op->pid[i] &= ~p->dpid[i]; op->pid[i] &= ~p->dpid[i];