diff --git a/src/input/mpegts/dvb_psi.c b/src/input/mpegts/dvb_psi.c index 2b48b92c..2829c479 100644 --- a/src/input/mpegts/dvb_psi.c +++ b/src/input/mpegts/dvb_psi.c @@ -609,7 +609,7 @@ dvb_pat_callback int save = 0; if ((s = mpegts_service_find(mm, sid, pid, 1, &save))) { mpegts_table_add(mm, DVB_PMT_BASE, DVB_PMT_MASK, dvb_pmt_callback, - NULL, "pmt", MT_CRC | MT_QUICKREQ | MT_RECORD, pid); + NULL, "pmt", MT_CRC | MT_QUICKREQ, pid); if (save) service_request_save((service_t*)s, 1); diff --git a/src/input/mpegts/mpegts_input.c b/src/input/mpegts/mpegts_input.c index 732e2569..9e1e0e8c 100644 --- a/src/input/mpegts/mpegts_input.c +++ b/src/input/mpegts/mpegts_input.c @@ -365,20 +365,29 @@ mpegts_input_recv_packets /* Find PID */ if ((mp = mpegts_mux_find_pid(mm, pid, 0))) { int stream = 0; - int table = 0; + int table = 0; /* Stream takes pref. */ RB_FOREACH(mps, &mp->mp_subs, mps_link) { if (mps->mps_type & MPS_STREAM) stream = 1; if (mps->mps_type & MPS_TABLE) - table = 1; + table = 1; + } + + /* Special case streams */ + if (pid == 0) table = stream = 1; + LIST_FOREACH(s, &mi->mi_transports, s_active_link) { + if (pid == s->s_pmt_pid) stream = 1; + else if (pid == s->s_pcr_pid) stream = 1; } /* Stream data */ if (stream) { - LIST_FOREACH(s, &mi->mi_transports, s_active_link) - ts_recv_packet1((mpegts_service_t*)s, tsb+i, ppcr, table); + LIST_FOREACH(s, &mi->mi_transports, s_active_link) { + int f = table || (pid == s->s_pmt_pid) || (pid == s->s_pcr_pid); + ts_recv_packet1((mpegts_service_t*)s, tsb+i, ppcr, f); + } } /* Table data */