From: Jaroslav Kysela Date: Thu, 14 Feb 2019 15:50:31 +0000 (+0100) Subject: satip client: workaround for FritzBox 6490/6590 (status string parsing), rewritten... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5caf8b8a445797a176376c9b28ce9f12cd28cf46;p=thirdparty%2Ftvheadend.git satip client: workaround for FritzBox 6490/6590 (status string parsing), rewritten PR#1256 --- diff --git a/src/input/mpegts/satip/satip_frontend.c b/src/input/mpegts/satip/satip_frontend.c index 6deacd6d0..7c2aa8561 100644 --- a/src/input/mpegts/satip/satip_frontend.c +++ b/src/input/mpegts/satip/satip_frontend.c @@ -1024,9 +1024,14 @@ satip_frontend_decode_rtcp( satip_frontend_t *lfe, const char *name, s = (char *)rtcp + 16; tvhtrace(LS_SATIP, "Status string: '%s'", s); status = SIGNAL_NONE; - if (strncmp(s, "ver=0.9;tuner=", 14) == 0 || - strncmp(s, "ver=1.2;tuner=", 14) == 0) { - n = http_tokenize(s + 14, argv, 4, ','); + if (strncmp(s, "ver=1.2;src=1;tuner=", 20) == 0) { + /* broken FritzBox 6490/6590 */ + n = http_tokenize(s + 20, argv, ARRAY_SIZE(argv), ','); + goto __ver12; + } else if (strncmp(s, "ver=0.9;tuner=", 14) == 0 || + strncmp(s, "ver=1.2;tuner=", 14) == 0) { + n = http_tokenize(s + 14, argv, ARRAY_SIZE(argv), ','); +__ver12: if (n < 4) goto fail; if (atoi(argv[0]) != lfe->sf_number) @@ -1051,7 +1056,7 @@ satip_frontend_decode_rtcp( satip_frontend_t *lfe, const char *name, if ((s = strstr(s + 8, ";tuner=")) == NULL) goto fail; s += 7; - n = http_tokenize(s, argv, 4, ','); + n = http_tokenize(s, argv, ARRAY_SIZE(argv), ','); if (n < 4) goto fail; if (atoi(argv[0]) != lfe->sf_number)