[pulseaudio-discuss] [PATCH 2/3] rtp: Fix typo in the chunk length calculation
Cédric Schieli
cschieli at gmail.com
Mon May 9 09:33:53 UTC 2016
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 <cschieli at gmail.com>
---
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
More information about the pulseaudio-discuss
mailing list