From e461ab46d4ee6ef44266f7e2bf9b5508f1eb2770 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 15 Jul 2011 16:34:02 +0200 Subject: [PATCH] X11: also check the bufferpool Don't just check the availability of the metadata but also if the buffer is really from our bufferpool. --- sys/ximage/ximagesink.c | 2 +- sys/xvimage/xvimagesink.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 5bf8949ff8..00c38176a5 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -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"); diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index f4725b069c..1b12cf3aca 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -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",