Although it should not trigger too often (cc is almost always 0) the
length calculation is obviously wrong here.

Signed-off-by: Cédric Schieli <[email protected]>
---
 src/modules/rtp/rtp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/rtp/rtp.c b/src/modules/rtp/rtp.c
index 17c8d3c..170ce96 100644
--- a/src/modules/rtp/rtp.c
+++ b/src/modules/rtp/rtp.c
@@ -281,7 +281,7 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, 
pa_mempool *pool, struct
     }
 
     chunk->index += 12 + cc*4;
-    chunk->length = (size_t) size - 12 + cc*4;
+    chunk->length = (size_t) size - 12 - cc*4;
 
     if (chunk->length % c->frame_size != 0) {
         pa_log_warn("Bad RTP packet size.");
-- 
2.7.3

_______________________________________________
pulseaudio-discuss mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to