From: Adam Sutton Date: Mon, 18 Jun 2012 12:38:01 +0000 (+0100) Subject: Allow multiple callbacks per PID (with limitations). X-Git-Tag: 3.0~15^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e183645081af85ae3a85c9cc43088d7a22b2b901;p=thirdparty%2Ftvheadend.git Allow multiple callbacks per PID (with limitations). --- diff --git a/src/dvb/dvb_tables.c b/src/dvb/dvb_tables.c index 03069044e..b68ba3d13 100644 --- a/src/dvb/dvb_tables.c +++ b/src/dvb/dvb_tables.c @@ -282,8 +282,13 @@ tdt_add(th_dvb_mux_instance_t *tdmi, struct dmx_sct_filter_params *fparams, { th_dvb_table_t *t; + // Allow multiple entries per PID, but only one per callback/opaque instance + // TODO: this could mean reading the same data multiple times, and not + // sure how well this will work! I know Andreas has some thoughts on + // this LIST_FOREACH(t, &tdmi->tdmi_tables, tdt_link) { - if(pid == t->tdt_pid) { + if(pid == t->tdt_pid && + tdt->tdt_callback == callback && tdt->tdt_opaque == opaque) { free(tdt); free(fparams); return;