From: Jaroslav Kysela Date: Fri, 28 Apr 2017 13:33:47 +0000 (+0200) Subject: satip client: ignore RTP packets with zero length (minisatip 0.7) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a3252932b2fc597d0a82a9892b5084aa80dc231;p=thirdparty%2Ftvheadend.git satip client: ignore RTP packets with zero length (minisatip 0.7) --- diff --git a/src/input/mpegts/satip/satip_frontend.c b/src/input/mpegts/satip/satip_frontend.c index a56a0336a..f2cf21818 100644 --- a/src/input/mpegts/satip/satip_frontend.c +++ b/src/input/mpegts/satip/satip_frontend.c @@ -1274,7 +1274,7 @@ satip_frontend_rtp_data_received( http_client_t *hc, void *buf, size_t len ) pos += (((p[pos+2] << 8) | p[pos+3]) + 1) * 4; } r = c - pos; - if (c <= pos || (r % 188) != 0) + if (c < pos || (r % 188) != 0) return 0; /* Use uncorrectable value to notify RTP delivery issues */ nseq = (p[2] << 8) | p[3]; @@ -1286,6 +1286,8 @@ satip_frontend_rtp_data_received( http_client_t *hc, void *buf, size_t len ) tvhtrace(LS_SATIP, "TCP/RTP discontinuity (%i != %i)", lfe->sf_seq + 1, nseq); } lfe->sf_seq = nseq; + if (r == 0) + return 0; /* Process */ if (lfe->sf_skip_ts > 0) { @@ -1856,7 +1858,7 @@ new_tune: pos += (((p[pos+2] << 8) | p[pos+3]) + 1) * 4; } r = c - pos; - if (c <= pos || (r % 188) != 0) + if (c < pos || (r % 188) != 0) continue; /* Use uncorrectable value to notify RTP delivery issues */ nseq = (p[2] << 8) | p[3]; @@ -1867,6 +1869,8 @@ new_tune: tvhtrace(LS_SATIP, "RTP discontinuity (%i != %i)", seq + 1, nseq); } seq = nseq; + if (r == 0) + continue; /* Process */ if (lfe->sf_skip_ts > 0) { if (lfe->sf_skip_ts < r) {