From: Jaroslav Kysela Date: Mon, 9 Oct 2017 12:21:28 +0000 (+0200) Subject: satip server: rectrict pids=all requests, fixes #4620 X-Git-Tag: v4.2.4~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a298be9be1d00fbdef52f9262fc664e9f2b9aa2b;p=thirdparty%2Ftvheadend.git satip server: rectrict pids=all requests, fixes #4620 From: Mono Polimorph --- diff --git a/src/satip/rtsp.c b/src/satip/rtsp.c index c974e0b00..d36a1afa4 100644 --- a/src/satip/rtsp.c +++ b/src/satip/rtsp.c @@ -854,7 +854,16 @@ parse_pids(char *p, mpegts_apids_t *pids) if (x == NULL) break; if (strcmp(x, "all") == 0) { - pids->all = 1; + if (satip_server_conf.satip_restrict_pids_all) { + pids->all = 0; + for (pid = 1; pid <= 2; pid++) /* CAT, TSDT */ + mpegts_pid_add(pids, pid, MPS_WEIGHT_RAW); + for (pid = 0x10; pid < 0x20; pid++) /* NIT ... SIT */ + mpegts_pid_add(pids, pid, MPS_WEIGHT_RAW); + mpegts_pid_add(pids, 0x1ffb, MPS_WEIGHT_RAW); /* ATSC */ + } else { + pids->all = 1; + } } else { pids->all = 0; pid = atoi(x); diff --git a/src/satip/server.c b/src/satip/server.c index e6b5fdf62..9fba20ef5 100644 --- a/src/satip/server.c +++ b/src/satip/server.c @@ -677,6 +677,16 @@ const idclass_t satip_server_class = { .off = offsetof(struct satip_server_conf, satip_noupnp), .group = 1, }, + { + .type = PT_BOOL, + .id = "satip_restrict_pids_all", + .name = N_("Restrict \"pids=all\""), + .desc = N_("Replace the full Transport Stream with a range " + "0x00-0x02,0x10-0x1F,0x1FFB pids only."), + .off = offsetof(struct satip_server_conf, satip_restrict_pids_all), + .opts = PO_EXPERT, + .group = 1, + }, { .type = PT_INT, .id = "satip_weight", diff --git a/src/satip/server.h b/src/satip/server.h index 054e48138..908d9291a 100644 --- a/src/satip/server.h +++ b/src/satip/server.h @@ -51,6 +51,7 @@ struct satip_server_conf { int satip_notcp_mode; int satip_anonymize; int satip_noupnp; + int satip_restrict_pids_all; int satip_iptv_sig_level; int satip_force_sig_level; int satip_dvbs;