[0.11] gstreamer: buffer: ensure writable memory in memset

Wim Taymans wtay at kemper.freedesktop.org
Fri Jan 6 04:33:40 PST 2012


Module: gstreamer
Branch: 0.11
Commit: ad9450e1c05d8be067e3fce354bac66403148c42
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=ad9450e1c05d8be067e3fce354bac66403148c42

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Fri Jan  6 13:32:55 2012 +0100

buffer: ensure writable memory in memset

---

 gst/gstbuffer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gst/gstbuffer.c b/gst/gstbuffer.c
index 8aacdeb..cf6b144 100644
--- a/gst/gstbuffer.c
+++ b/gst/gstbuffer.c
@@ -1198,7 +1198,7 @@ gst_buffer_memset (GstBuffer * buffer, gsize offset, guint8 val, gsize size)
     gsize ssize, toset;
     GstMemory *mem;
 
-    mem = GST_BUFFER_MEM_PTR (buffer, i);
+    mem = _get_memory (buffer, i, TRUE);
 
     data = gst_memory_map (mem, &ssize, NULL, GST_MAP_WRITE);
     if (ssize > offset) {



More information about the gstreamer-commits mailing list