diff --git a/src/psi.c b/src/psi.c index dca98658..9763a50a 100644 --- a/src/psi.c +++ b/src/psi.c @@ -468,6 +468,10 @@ psi_parse_pmt(service_t *t, const uint8_t *ptr, int len, int chksvcid, /* Mark all streams for deletion */ if(delete) { TAILQ_FOREACH(st, &t->s_components, es_link) { + + if(st->es_type == SCT_PMT) + continue; + st->es_delete_me = 1; LIST_FOREACH(c, &st->es_caids, link) diff --git a/src/rawtsinput.c b/src/rawtsinput.c index e22ac146..a947de56 100644 --- a/src/rawtsinput.c +++ b/src/rawtsinput.c @@ -164,7 +164,7 @@ got_pmt(struct service *t, elementary_stream_t *st, return; pthread_mutex_lock(&global_lock); - psi_parse_pmt(t, table + 3, table_len - 3, 1, 0); + psi_parse_pmt(t, table + 3, table_len - 3, 1, 1); pthread_mutex_unlock(&global_lock); }