playbin: First try to get the pad's current caps, then query caps

The caps query might give us ANY caps while the pad has fixed caps
configured currently.
This commit is contained in:
Sebastian Dröge 2014-02-11 16:35:45 +01:00
parent 57295753d5
commit a02678057e

View file

@ -2994,7 +2994,9 @@ pad_added_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group)
playbin = group->playbin;
caps = gst_pad_query_caps (pad, NULL);
caps = gst_pad_get_current_caps (pad);
if (!caps)
caps = gst_pad_query_caps (pad, NULL);
s = gst_caps_get_structure (caps, 0);
name = gst_structure_get_name (s);