summaryrefslogtreecommitdiff
path: root/gst-libs/gst/rtp
diff options
context:
space:
mode:
authorBrian Peters <brianfpeters@gmail.com>2015-07-30 14:30:44 +0100
committerTim-Philipp Müller <tim@centricular.com>2015-07-30 14:30:44 +0100
commit04c69952c05bde13289fa1c0630687e2dd5b3c93 (patch)
treedc9131d5d658c8588b18fd199daf530095dc4c0f /gst-libs/gst/rtp
parent232bdf17115419da61c3b1ce2c5b02d74e34d403 (diff)
rtp: buffer: don't access NULL buffer pointer
unmap will set rtpbuffer->buffer to NULL, so we need to save the pointer to access it while the RTP buffer is unmapped. https://bugzilla.gnome.org/show_bug.cgi?id=753001
Diffstat (limited to 'gst-libs/gst/rtp')
-rw-r--r--gst-libs/gst/rtp/gstrtpbuffer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst-libs/gst/rtp/gstrtpbuffer.c b/gst-libs/gst/rtp/gstrtpbuffer.c
index fe160ab5e..51b323ee1 100644
--- a/gst-libs/gst/rtp/gstrtpbuffer.c
+++ b/gst-libs/gst/rtp/gstrtpbuffer.c
@@ -787,8 +787,10 @@ ensure_buffers (GstRTPBuffer * rtp)
}
if (changed) {
+ GstBuffer *buf = rtp->buffer;
+
gst_rtp_buffer_unmap (rtp);
- gst_buffer_remove_memory_range (rtp->buffer, pos, -1);
+ gst_buffer_remove_memory_range (buf, pos, -1);
gst_rtp_buffer_map (rtp->buffer, GST_MAP_READWRITE, rtp);
}
}