From 730b88a6771e440f09a09ff74b7eafee7ce82faf Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 25 Jun 2014 22:05:37 +1000 Subject: [PATCH] glfilter: pass through the allocation query when in passthrough mode Otherwise two GL elements on either side will fail to use the same GL context. --- gst-libs/gst/gl/gstglfilter.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c index 6a1ab22..1f8ccd9 100644 --- a/gst-libs/gst/gl/gstglfilter.c +++ b/gst-libs/gst/gl/gstglfilter.c @@ -215,25 +215,29 @@ gst_gl_filter_query (GstBaseTransform * trans, GstPadDirection direction, GstQuery * query) { GstGLFilter *filter; - gboolean res; filter = GST_GL_FILTER (trans); switch (GST_QUERY_TYPE (query)) { + case GST_QUERY_ALLOCATION: + { + if (direction == GST_PAD_SINK + && gst_base_transform_is_passthrough (trans)) + return gst_pad_peer_query (GST_BASE_TRANSFORM_SRC_PAD (trans), query); + break; + } case GST_QUERY_CONTEXT: { - res = gst_gl_handle_context_query ((GstElement *) filter, query, + return gst_gl_handle_context_query ((GstElement *) filter, query, &filter->display); break; } default: - res = - GST_BASE_TRANSFORM_CLASS (parent_class)->query (trans, direction, - query); break; } - return res; + return GST_BASE_TRANSFORM_CLASS (parent_class)->query (trans, direction, + query);; } static void -- 2.7.4