From bb5fe1145db9c501e5f7f8a6241bee0d2cf3b1b7 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 19 Mar 2015 23:01:28 +0100 Subject: [PATCH] SAT>IP Server: DVBC - fix stream id initialization --- src/satip/rtsp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/satip/rtsp.c b/src/satip/rtsp.c index 495583fa..2098d21d 100644 --- a/src/satip/rtsp.c +++ b/src/satip/rtsp.c @@ -980,8 +980,13 @@ rtsp_parse_cmd if (sr < 1000) goto end; ds = atoi(http_arg_get_remove(&hc->hc_req_args, "ds")); if (ds < 0 || ds > 255) goto end; - plp = atoi(http_arg_get_remove(&hc->hc_req_args, "plp")); - if (plp < 0 || plp > 255) goto end; + s = http_arg_get_remove(&hc->hc_req_args, "plp"); + if (s[0]) { + plp = atoi(http_arg_get_remove(&hc->hc_req_args, "plp")); + if (plp < 0 || plp > 255) goto end; + } else { + plp = DVB_NO_STREAM_ID_FILTER; + } specinv = atoi(http_arg_get_remove(&hc->hc_req_args, "specinv")); if (specinv < 0 || specinv > 1) goto end;