buffer: ensure writable memory in memset

This commit is contained in:
Wim Taymans 2012-01-06 13:32:55 +01:00
parent 80f4716a61
commit ad9450e1c0

View file

@ -1198,7 +1198,7 @@ gst_buffer_memset (GstBuffer * buffer, gsize offset, guint8 val, gsize size)
gsize ssize, toset; gsize ssize, toset;
GstMemory *mem; 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); data = gst_memory_map (mem, &ssize, NULL, GST_MAP_WRITE);
if (ssize > offset) { if (ssize > offset) {