Never delete streams when reading from raw ts file input
This commit is contained in:
parent
cdcccde130
commit
2eba601b48
4 changed files with 9 additions and 6 deletions
|
@ -1002,7 +1002,7 @@ dvb_pmt_callback(th_dvb_mux_instance_t *tdmi, uint8_t *ptr, int len,
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -236,7 +236,8 @@ psi_desc_ca(th_transport_t *t, uint8_t *ptr, int len)
|
|||
* 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;
|
||||
|
@ -276,8 +277,9 @@ psi_parse_pmt(th_transport_t *t, uint8_t *ptr, int len, int chksvcid)
|
|||
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];
|
||||
|
|
|
@ -35,7 +35,8 @@ int psi_section_reassemble(psi_section_t *ps, uint8_t *data, int len,
|
|||
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);
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ got_pmt(struct th_transport *t, th_stream_t *st,
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue