xvimagesink: mark as NO_SHARE
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 5 Mar 2013 15:34:35 +0000 (16:34 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 5 Mar 2013 15:34:35 +0000 (16:34 +0100)
We don't want to share the memory between buffers because that could
cause the memory of the bufferpool buffers to be copied and replaced
with other memory.

This is a hopefully a temporary fix until we can figure out how to share
properly.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=695203

sys/xvimage/xvimagepool.c
sys/xvimage/xvimagesink.c

index 31673bb..3a85682 100644 (file)
@@ -397,8 +397,8 @@ xvimage_memory_alloc (GstXvImageBufferPool * xvpool)
   error_caught = FALSE;
   XSetErrorHandler (handler);
 
-  gst_memory_init (GST_MEMORY_CAST (mem), 0, xvpool->allocator,
-      NULL, mem->size + align, align, offset, mem->size);
+  gst_memory_init (GST_MEMORY_CAST (mem), GST_MEMORY_FLAG_NO_SHARE,
+      xvpool->allocator, NULL, mem->size + align, align, offset, mem->size);
 
   g_mutex_unlock (&xvimagesink->x_lock);
 
index 5d3bccd..76db6b4 100644 (file)
@@ -1849,7 +1849,7 @@ gst_xvimagesink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
       goto no_buffer;
 
     GST_CAT_LOG_OBJECT (GST_CAT_PERFORMANCE, xvimagesink,
-        "slow copy into bufferpool buffer %p", to_put);
+        "slow copy buffer %p into bufferpool buffer %p", buf, to_put);
 
     if (!gst_video_frame_map (&src, &xvimagesink->info, buf, GST_MAP_READ))
       goto invalid_buffer;