playbin2: avoid copying caps
Use get_caps_refed() when we can.
This commit is contained in:
parent
89f02fb269
commit
fcb283b78b
@ -2044,7 +2044,7 @@ pad_added_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group)
|
||||
|
||||
playbin = group->playbin;
|
||||
|
||||
caps = gst_pad_get_caps (pad);
|
||||
caps = gst_pad_get_caps_refed (pad);
|
||||
s = gst_caps_get_structure (caps, 0);
|
||||
name = gst_structure_get_name (s);
|
||||
|
||||
|
@ -967,7 +967,7 @@ has_all_raw_caps (GstPad * pad, gboolean * all_raw)
|
||||
guint i, num_raw = 0;
|
||||
gboolean res = FALSE;
|
||||
|
||||
caps = gst_pad_get_caps (pad);
|
||||
caps = gst_pad_get_caps_refed (pad);
|
||||
if (caps == NULL)
|
||||
return FALSE;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user