diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2014-05-09 20:05:07 -0400 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2014-05-09 23:03:43 -0400 |
commit | 4ccf7582a2178f67d403d8abe0c4b1e35e3875bd (patch) | |
tree | 42ed0136bf13937cd8b0145185772cfde3027df7 /gst/autoconvert | |
parent | f3f6cdd45199ff89c5dcc5b76221c94020e7bd17 (diff) | |
download | gstreamer-plugins-bad-4ccf7582a2178f67d403d8abe0c4b1e35e3875bd.tar.gz |
autoconvert: Don't ignore elements accepted ANY, it is valid
Diffstat (limited to 'gst/autoconvert')
-rw-r--r-- | gst/autoconvert/gstautoconvert.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gst/autoconvert/gstautoconvert.c b/gst/autoconvert/gstautoconvert.c index aa48305ec..5b39a9ee0 100644 --- a/gst/autoconvert/gstautoconvert.c +++ b/gst/autoconvert/gstautoconvert.c @@ -1102,16 +1102,14 @@ gst_auto_convert_getcaps (GstAutoConvert * autoconvert, GstCaps * filter, element_caps = gst_pad_peer_query_caps (internal_pad, filter); - if (element_caps) { - if (!gst_caps_is_any (element_caps) && - !gst_caps_is_empty (element_caps)) { - caps = gst_caps_merge (caps, element_caps); - } else { - gst_caps_unref (element_caps); - } - } + if (element_caps) + caps = gst_caps_merge (caps, element_caps); gst_object_unref (element); + + /* Early out, any is absorbing */ + if (gst_caps_is_any (caps)) + goto out; } else { const GList *tmp; @@ -1122,10 +1120,13 @@ gst_auto_convert_getcaps (GstAutoConvert * autoconvert, GstCaps * filter, if (GST_PAD_TEMPLATE_DIRECTION (template) == dir) { GstCaps *static_caps = gst_static_pad_template_get_caps (template); - if (static_caps && !gst_caps_is_any (static_caps) && - !gst_caps_is_empty (static_caps)) { + if (static_caps) { caps = gst_caps_merge (caps, static_caps); } + + /* Early out, any is absorbing */ + if (gst_caps_is_any (caps)) + goto out; } } } |