decklinksink: Only intersect with the filter caps if there actually is a filter
authorSebastian Dröge <sebastian@centricular.com>
Tue, 17 Dec 2013 09:21:26 +0000 (10:21 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 17 Dec 2013 09:21:26 +0000 (10:21 +0100)
sys/decklink/gstdecklinksink.cpp

index b0c86ee..afbd304 100644 (file)
@@ -565,8 +565,12 @@ gst_decklink_sink_videosink_query (GstPad * pad, GstObject * parent,
        * should probably return the template caps instead */
       mode_caps = gst_decklink_mode_get_caps (decklinksink->mode);
       gst_query_parse_caps (query, &filter);
-      caps = gst_caps_intersect (mode_caps, filter);
-      gst_caps_unref (mode_caps);
+      if (filter) {
+        caps = gst_caps_intersect (mode_caps, filter);
+        gst_caps_unref (mode_caps);
+      } else {
+        caps = mode_caps;
+      }
       gst_query_set_caps_result (query, caps);
       gst_caps_unref (caps);
       res = TRUE;