From: Nita Vesa Date: Wed, 23 Feb 2022 19:45:52 +0000 (+0200) Subject: Always parse 'src' in RTSP-requests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90ba8b1c1ec01021da032813eae14007d753fc91;p=thirdparty%2Ftvheadend.git Always parse 'src' in RTSP-requests Originally, the code did not parse 'src' in RTSP-requests for DVB-C tuners. This patch moves to always parse the parameter, allowing e.g. Plex and possibly other SAT>IP-clients to work. Signed-off-by: Nita Vesa --- diff --git a/src/satip/rtsp.c b/src/satip/rtsp.c index 5cc818fee..a95f2313d 100644 --- a/src/satip/rtsp.c +++ b/src/satip/rtsp.c @@ -1157,12 +1157,12 @@ rtsp_parse_cmd mtype = mtype_to_tvh(hc); if (mtype == DVB_MOD_NONE) goto end; - src = 1; + src = http_arg_get(&hc->hc_req_args, "src") ? + atoi(http_arg_get_remove(&hc->hc_req_args, "src")) : 1; + if (src < 1) goto end; if (msys == DVB_SYS_DVBS || msys == DVB_SYS_DVBS2) { - src = atoi(http_arg_get_remove(&hc->hc_req_args, "src") ?: "0"); - if (src < 1) goto end; pol = pol_to_tvh(hc); if (pol < 0) goto end; sr = atof(http_arg_get_remove(&hc->hc_req_args, "sr") ?: "0") * 1000;