X11: also check the bufferpool
authorWim Taymans <wim.taymans@collabora.co.uk>
Fri, 15 Jul 2011 14:34:02 +0000 (16:34 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Fri, 15 Jul 2011 14:35:44 +0000 (16:35 +0200)
Don't just check the availability of the metadata but also if the buffer is
really from our bufferpool.

sys/ximage/ximagesink.c
sys/xvimage/xvimagesink.c

index 5bf8949..00c3817 100644 (file)
@@ -1292,7 +1292,7 @@ gst_ximagesink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
 
   meta = gst_buffer_get_meta_ximage (buf);
 
-  if (meta) {
+  if (meta && buf->pool == ximagesink->pool) {
     /* If this buffer has been allocated using our buffer management we simply
        put the ximage which is in the PRIVATE pointer */
     GST_LOG_OBJECT (ximagesink, "buffer from our pool, writing directly");
index f4725b0..1b12cf3 100644 (file)
@@ -1806,7 +1806,7 @@ gst_xvimagesink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
 
   meta = gst_buffer_get_meta_xvimage (buf);
 
-  if (meta) {
+  if (meta && buf->pool == xvimagesink->pool) {
     /* If this buffer has been allocated using our buffer management we simply
        put the ximage which is in the PRIVATE pointer */
     GST_LOG_OBJECT (xvimagesink, "buffer %p from our pool, writing directly",