]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
SAT>IP client: add RTCP workaround for broken servers (minisatip)
authorJaroslav Kysela <perex@perex.cz>
Mon, 13 Apr 2015 18:11:19 +0000 (20:11 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 13 Apr 2015 18:11:19 +0000 (20:11 +0200)
src/input/mpegts/satip/satip_frontend.c

index f658e59bda7b35902174b513958452fa29e7b6e8..23b7a2ed8443b2d3bdb8fcb6d7af3f353196a772 100644 (file)
@@ -703,11 +703,12 @@ satip_frontend_decode_rtcp( satip_frontend_t *lfe, const char *name,
     if ((rtcp[0] & 0xc0) != 0x80)              /* protocol version: v2 */
       return;
     l = (((rtcp[2] << 8) | rtcp[3]) + 1) * 4;   /* length of payload */
-    if (l > len)
-      return;
     if (rtcp[1]  ==  204 && l > 20 &&           /* packet type */
         rtcp[8]  == 'S'  && rtcp[9]  == 'E' &&
         rtcp[10] == 'S'  && rtcp[11] == '1') {
+      /* workaround for broken minisatip */
+      if (l > len && l - 4 != len)
+        return;
       sl = (rtcp[14] << 8) | rtcp[15];
       if (sl > 0 && l - 16 >= sl) {
         rtcp[sl + 16] = '\0';