Commit e3b5a2e4 authored by Wim Taymans's avatar Wim Taymans

update for memory api change

parent 91a58ccd
......@@ -692,8 +692,8 @@ buffer_list_copy_data (GstBuffer ** buf, guint idx, gpointer data)
for (i = 0; i < num; ++i) {
GstMemory *mem;
mem = gst_buffer_peek_memory (*buf, i, GST_MAP_READ);
gst_buffer_take_memory (dest, -1, gst_memory_ref (mem));
mem = gst_buffer_get_memory (*buf, i);
gst_buffer_take_memory (dest, -1, mem);
}
return TRUE;
......
......@@ -458,7 +458,7 @@ gst_multiudpsink_render (GstBaseSink * bsink, GstBuffer * buffer)
size = 0;
for (i = 0; i < n_mem; i++) {
mem = gst_buffer_peek_memory (buffer, i, GST_MAP_READ);
mem = gst_buffer_get_memory (buffer, i);
gst_memory_map (mem, &map[i], GST_MAP_READ);
if (map[i].size > UDP_MAX_SIZE) {
......@@ -510,8 +510,10 @@ gst_multiudpsink_render (GstBaseSink * bsink, GstBuffer * buffer)
g_mutex_unlock (&sink->client_lock);
/* unmap all memory again */
for (i = 0; i < n_mem; i++)
for (i = 0; i < n_mem; i++) {
gst_memory_unmap (map[i].memory, &map[i]);
gst_memory_unref (map[i].memory);
}
g_free (vec);
g_free (map);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment