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:
parent
57295753d5
commit
a02678057e
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user