th_transport_t *t = opaque;
pthread_mutex_lock(&t->tht_stream_mutex);
- psi_parse_pmt(t, ptr, len, 1);
+ psi_parse_pmt(t, ptr, len, 1, 1);
pthread_mutex_unlock(&t->tht_stream_mutex);
return 0;
}
* PMT parser, from ISO 13818-1 and ETSI EN 300 468
*/
int
-psi_parse_pmt(th_transport_t *t, uint8_t *ptr, int len, int chksvcid)
+psi_parse_pmt(th_transport_t *t, uint8_t *ptr, int len, int chksvcid,
+ int delete)
{
uint16_t pcr_pid, pid;
uint8_t estype;
len -= 9;
/* Mark all streams for deletion */
- LIST_FOREACH(st, &t->tht_components, st_link)
- st->st_delete_me = 1;
+ if(delete)
+ LIST_FOREACH(st, &t->tht_components, st_link)
+ st->st_delete_me = 1;
while(dllen > 1) {
dtag = ptr[0];
int psi_parse_pat(th_transport_t *t, uint8_t *ptr, int len,
pid_section_callback_t *pmt_callback);
-int psi_parse_pmt(th_transport_t *t, uint8_t *ptr, int len, int chksvcid);
+int psi_parse_pmt(th_transport_t *t, uint8_t *ptr, int len, int chksvcid,
+ int delete);
uint32_t psi_crc32(uint8_t *data, size_t datalen);
return;
pthread_mutex_lock(&global_lock);
- psi_parse_pmt(t, table + 3, table_len - 3, 1);
+ psi_parse_pmt(t, table + 3, table_len - 3, 1, 0);
pthread_mutex_unlock(&global_lock);
}