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
This commit is contained in:
Brian Peters 2015-07-30 14:30:44 +01:00 committed by Tim-Philipp Müller
parent 232bdf1711
commit 04c69952c0

View file

@ -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);
}
}