]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Always parse 'src' in RTSP-requests
authorNita Vesa <werecatf@outlook.com>
Wed, 23 Feb 2022 19:45:52 +0000 (21:45 +0200)
committerFlole998 <Flole998@users.noreply.github.com>
Tue, 5 Apr 2022 05:02:14 +0000 (07:02 +0200)
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 <werecatf@outlook.com>
src/satip/rtsp.c

index 5cc818feef2349c24a83b3a76e513237170c34d9..a95f2313dcaa7a578203dd841d50fe12e18e819b 100644 (file)
@@ -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;