--- multiplexer/en300468ts.c 2010/09/29 21:39:04 1.23 +++ multiplexer/en300468ts.c 2010/09/29 21:39:52 1.24 @@ -1564,13 +1564,14 @@ static enum enumsi alloctab(long pid, lo return e; } -static void droptab(long pid, long tableid) +static void droptab(long pid, long tableid, long tableid_ext) { struct sitab **pst; struct sitab *st; pst = &runtab; while ((st = *pst)) { - if ((st->pid == pid) && (st->tableid == tableid)) { + if ((st->pid == pid) && (st->tableid == tableid) + && ((tableid_ext < 0) || (st->tableid_ext == tableid_ext))) { *pst = st->next; nextversion[st->tableid - TABLEID_FIRST] = (st->version + 1) & 0x1F; free(st->tab); @@ -1627,7 +1628,7 @@ static int tabline(char *b, int n) if (a == z) { fprintf(stderr, "invalid line(%d): %s\n", a-b, b); } else { - droptab(v[0], v[1]); + droptab(v[0], v[1], -1); } break; case 'S': @@ -2206,7 +2207,7 @@ static void argloop(int f0) if (newtab->tableid_ext) { newtab->tableid_ext = newtab->tab[0]; } - droptab(newtab->pid, newtab->tableid); + droptab(newtab->pid, newtab->tableid, newtab->tableid_ext); newtab->version = nextversion[newtab->tableid - TABLEID_FIRST]; newtab->soon = tv; newtab->next = runtab;