decklinksink: Only intersect with the filter caps if there actually is a filter

This commit is contained in:
Sebastian Dröge 2013-12-17 10:21:26 +01:00
parent ccd9a9cb89
commit 007807d149

View 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);
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;