update for memory api change

This commit is contained in:
Wim Taymans 2012-02-13 17:13:17 +01:00
parent 91a58ccda1
commit e3b5a2e40d
2 changed files with 6 additions and 4 deletions

View file

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

View file

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