]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Allow multiple callbacks per PID (with limitations). 95/head
authorAdam Sutton <dev@adamsutton.me.uk>
Mon, 18 Jun 2012 12:38:01 +0000 (13:38 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Tue, 19 Jun 2012 09:32:01 +0000 (10:32 +0100)
src/dvb/dvb_tables.c

index 03069044e282add6bfe92b7c45477a549f0f55ef..b68ba3d13830563b2ccaf8946b9c51bdf5e5ad65 100644 (file)
@@ -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;