]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
psip: look up EIT channel based on source_id
authorLauri Myllari <lauri.myllari@gmail.com>
Fri, 9 Jan 2015 18:11:21 +0000 (10:11 -0800)
committerJaroslav Kysela <perex@perex.cz>
Thu, 22 Oct 2015 15:33:58 +0000 (17:33 +0200)
src/epggrab/module/psip.c

index d41bd76ee58f7f70efd1bac88dd9460cffff37a5..65f7cb143bbb1b62d1ce034637d4f02e2e6c980a 100644 (file)
@@ -90,8 +90,15 @@ _psip_eit_callback
   tsid    = ptr[0] << 8 | ptr[1];
   extraid = tsid;
 
-  svc = mpegts_service_find(mm, tsid, 0, 0, 0);
-  if (!svc) return -1;
+  /* Look up channel based on the source id */
+  LIST_FOREACH(svc, &mm->mm_services, s_dvb_mux_link) {
+    if (svc->s_atsc_source_id == tsid)
+      break;
+  }
+  if (!svc) {
+    tvhwarn("psip", "EIT with no associated channel found (tsid 0x%04x)", tsid);
+    return -1;
+  }
 
   /* Begin */
   r = dvb_table_begin(mt, ptr, len, tableid, extraid, 7,