From b0c64a10f8458d611fe92385bd07c10e25ec22ea Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 29 Jul 2011 12:22:16 +0200 Subject: [PATCH] x11: relax bufferpool checks Check if the metadata belongs to us instead of checking the current bufferpool. The bufferpool can change at any time when upstream wants to renegotiate. --- 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 7413b78..5339e6a 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 && buf->pool == ximagesink->pool) { + if (meta && meta->sink == ximagesink) { /* 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 2533d3a..4b99143 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 && buf->pool == xvimagesink->pool) { + if (meta && meta->sink == xvimagesink) { /* 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", -- 2.7.4