diff --git a/docs/html/config_muxes.html b/docs/html/config_muxes.html index 6948cb04..e54a22c2 100644 --- a/docs/html/config_muxes.html +++ b/docs/html/config_muxes.html @@ -45,6 +45,11 @@
Character Set
The character encoding for this mux (e.g. UTF-8). + +
PMT Descriptor 0x06 = AC-3 +
Whether or not the empty PMT descriptor 0x06 defaults to + the AC-3 stream. Some Chinese cable providers are using + this. If unsure, keep this off.
Interface
IPTV : the network interface/card on which the IPTV source can be found. diff --git a/src/input/mpegts.h b/src/input/mpegts.h index f3d8c3ad..ba92210f 100644 --- a/src/input/mpegts.h +++ b/src/input/mpegts.h @@ -411,6 +411,7 @@ struct mpegts_mux int mm_enabled; int mm_epg; char *mm_charset; + int mm_pmt_06_ac3; }; /* Service */ diff --git a/src/input/mpegts/dvb_psi.c b/src/input/mpegts/dvb_psi.c index 90e4a7f0..0a420c64 100644 --- a/src/input/mpegts/dvb_psi.c +++ b/src/input/mpegts/dvb_psi.c @@ -34,7 +34,7 @@ SKEL_DECLARE(mpegts_table_state_skel, struct mpegts_table_state); static int -psi_parse_pmt(mpegts_service_t *t, const uint8_t *ptr, int len); +psi_parse_pmt(mpegts_mux_t *mux, mpegts_service_t *t, const uint8_t *ptr, int len); /* ************************************************************************** * Lookup tables @@ -695,7 +695,7 @@ dvb_pmt_callback tvhdebug("pmt", "sid %04X (%d)", sid, sid); pthread_mutex_lock(&s->s_stream_mutex); had_components = !!TAILQ_FIRST(&s->s_components); - r = psi_parse_pmt(s, ptr, len); + r = psi_parse_pmt(mt->mt_mux, s, ptr, len); pthread_mutex_unlock(&s->s_stream_mutex); if (r) service_restart((service_t*)s, had_components); @@ -1279,7 +1279,7 @@ psi_desc_teletext(mpegts_service_t *t, const uint8_t *ptr, int size, */ static int psi_parse_pmt - (mpegts_service_t *t, const uint8_t *ptr, int len) + (mpegts_mux_t *mux, mpegts_service_t *t, const uint8_t *ptr, int len) { int ret = 0; uint16_t pcr_pid, pid; @@ -1376,7 +1376,7 @@ psi_parse_pmt case 0x06: /* 0x06 is Chinese Cable TV AC-3 audio track */ /* but mark it so only when no more descriptors exist */ - if (dllen > 1) + if (dllen > 1 || !mux || !mux->mm_pmt_06_ac3) break; /* fall through to SCT_AC3 */ case 0x81: diff --git a/src/input/mpegts/mpegts_mux.c b/src/input/mpegts/mpegts_mux.c index 0e894435..d3959271 100644 --- a/src/input/mpegts/mpegts_mux.c +++ b/src/input/mpegts/mpegts_mux.c @@ -406,6 +406,13 @@ const idclass_t mpegts_mux_class = .opts = PO_RDONLY | PO_NOSAVE, .get = mpegts_mux_class_get_num_svc, }, + { + .type = PT_BOOL, + .id = "pmt_06_ac3", + .name = "PMT Descriptor 0x06 = AC-3", + .off = offsetof(mpegts_mux_t, mm_pmt_06_ac3), + .opts = PO_ADVANCED, + }, {} } };