summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGöran Jönsson <goranjn@axis.com>2019-06-27 08:04:07 +0200
committerTim-Philipp Müller <tim@centricular.com>2019-08-10 14:50:40 +0100
commitb2d6893455bbb43b9b527bb7b7f0674d1df8bf21 (patch)
treeae2a901cf18cb9f716b6330ecb70bda0f611ab9b
parent2bd1107045e312d5fc7d027098b057863eb8f1ea (diff)
downloadgstreamer-plugins-base-b2d6893455bbb43b9b527bb7b7f0674d1df8bf21.tar.gz
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.
-rw-r--r--gst-libs/gst/rtsp/gstrtspconnection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c
index 9f6353365..942ddba0d 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;
}