From: Jaroslav Kysela Date: Wed, 28 Mar 2018 09:26:31 +0000 (+0200) Subject: tsdemux: pass pid to ts_recv_packet1() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=38b32ed159374a285cf2f08390a359c3488a1ced;p=thirdparty%2Ftvheadend.git tsdemux: pass pid to ts_recv_packet1() --- diff --git a/src/input/mpegts/mpegts_input.c b/src/input/mpegts/mpegts_input.c index 56c6cbe46..94924ad5d 100644 --- a/src/input/mpegts/mpegts_input.c +++ b/src/input/mpegts/mpegts_input.c @@ -1442,7 +1442,7 @@ mpegts_input_process f = (type & (MPS_TABLE|MPS_FTABLE)) || (pid == s->s_components.set_pmt_pid) || (pid == s->s_components.set_pcr_pid); - ts_recv_packet1((mpegts_service_t*)s, tsb, llen, f); + ts_recv_packet1((mpegts_service_t*)s, pid, tsb, llen, f); } } else /* Stream table data */ @@ -1452,7 +1452,7 @@ mpegts_input_process f = (type & (MPS_TABLE|MPS_FTABLE)) || (pid == s->s_components.set_pmt_pid) || (pid == s->s_components.set_pcr_pid); - ts_recv_packet1((mpegts_service_t*)s, tsb, llen, f); + ts_recv_packet1((mpegts_service_t*)s, pid, tsb, llen, f); } } diff --git a/src/input/mpegts/tsdemux.c b/src/input/mpegts/tsdemux.c index 38d26d04a..bb2ac8e15 100644 --- a/src/input/mpegts/tsdemux.c +++ b/src/input/mpegts/tsdemux.c @@ -141,14 +141,13 @@ skip_cc: } /** - * Process service stream packets, extract PCR and optionally descramble + * Process service stream packets, optionally descramble */ int ts_recv_packet1 - (mpegts_service_t *t, const uint8_t *tsb, int len, int table) + (mpegts_service_t *t, uint16_t pid, const uint8_t *tsb, int len, int table) { elementary_stream_t *st; - int_fast16_t pid; uint_fast8_t scrambled, error = 0; int r; @@ -178,8 +177,6 @@ ts_recv_packet1 service_nicename((service_t*)t), t->s_tei_log.count); } - pid = (tsb[1] & 0x1f) << 8 | tsb[2]; - st = elementary_stream_find(&t->s_components, pid); if((st == NULL) && (pid != t->s_components.set_pcr_pid) && !table) { diff --git a/src/input/mpegts/tsdemux.h b/src/input/mpegts/tsdemux.h index f726013c3..2089f4b8d 100644 --- a/src/input/mpegts/tsdemux.h +++ b/src/input/mpegts/tsdemux.h @@ -25,7 +25,7 @@ void ts_recv_packet0 (struct mpegts_service *t, elementary_stream_t *st, const uint8_t *tsb, int len); int ts_recv_packet1 - (struct mpegts_service *t, const uint8_t *tsb, int len, int table); + (struct mpegts_service *t, uint16_t pid, const uint8_t *tsb, int len, int table); void ts_recv_packet2(struct mpegts_service *t, const uint8_t *tsb, int len);