From b2d6893455bbb43b9b527bb7b7f0674d1df8bf21 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=B6ran=20J=C3=B6nsson?= Date: Thu, 27 Jun 2019 08:04:07 +0200 Subject: [PATCH] rtpsconnection: Fix number of n_vectors Body_offset mean that so much data have been written. Without this patch n_vectors somtimes becomes one more than it should and then there will be an vector that have a random size causing writev_bytes to cause a "Bad address" error. --- gst-libs/gst/rtsp/gstrtspconnection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c index 9f63533..942ddba 100644 --- a/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/gst-libs/gst/rtsp/gstrtspconnection.c @@ -3871,7 +3871,7 @@ gst_rtsp_source_dispatch_write (GPollableOutputStream * stream, GstMemory *mem = gst_buffer_peek_memory (msg->body_buffer, m); /* Skip all memories we already wrote */ - if (offset + mem->size < msg->body_offset) { + if (offset + mem->size <= msg->body_offset) { offset += mem->size; continue; } -- 2.7.4