playbin2: avoid copying caps

Use get_caps_refed() when we can.
This commit is contained in:
Wim Taymans 2009-11-04 18:57:07 +01:00
parent 89f02fb269
commit fcb283b78b
2 changed files with 2 additions and 2 deletions

View file

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

View file

@ -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;