summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <ystreet00@gmail.com>2014-06-25 22:05:37 +1000
committerMatthew Waters <ystreet00@gmail.com>2014-06-25 22:05:37 +1000
commit720405b56188773a68ac521b491c21a4eac61f05 (patch)
tree9d02689acd71171370833e5bd76a8f042b050ba9
parenta2bd2ce83b68202feb3f6fc243044f726706dc44 (diff)
downloadgstreamer-plugins-bad-720405b56188773a68ac521b491c21a4eac61f05.tar.gz
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.
-rw-r--r--gst-libs/gst/gl/gstglfilter.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c
index 6a1ab22bd..1f8ccd951 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