gl/filter: fixup passthrough bufferpool
authorMatthew Waters <ystreet00@gmail.com>
Wed, 21 May 2014 09:47:22 +0000 (19:47 +1000)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:41 +0000 (19:31 +0000)
In a pipeline like so:
  videotestsrc ! gleffects ! videoconvert ! sink
gleffects was simply passing the videoconvert bufferpool to videotestsrc
and not creating a glbufferpool. videobufferpool would then fail
to allocate from the glallocator.

gst-libs/gst/gl/gstglfilter.c

index 50db294..4007ac2 100644 (file)
@@ -840,7 +840,8 @@ gst_gl_filter_propose_allocation (GstBaseTransform * trans,
 
     gst_query_parse_allocation (decide_query, &decide_caps, NULL);
     decide_pool = gst_base_transform_get_buffer_pool (trans);
-    if (gst_caps_is_equal_fixed (decide_caps, caps)) {
+    if (GST_IS_GL_BUFFER_POOL (decide_pool)
+        && gst_caps_is_equal_fixed (decide_caps, caps)) {
       pool = decide_pool;
     } else {
       GST_DEBUG_OBJECT (filter, "create new pool");