mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
inputselector: sync with copy in -base
Use _get_caps_reffed to avoid copies.
This commit is contained in:
parent
eca2e20945
commit
bbfff812bf
1 changed files with 2 additions and 2 deletions
|
@ -448,7 +448,7 @@ gst_selector_pad_getcaps (GstPad * pad)
|
||||||
sel = GST_INPUT_SELECTOR (gst_pad_get_parent (pad));
|
sel = GST_INPUT_SELECTOR (gst_pad_get_parent (pad));
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (sel, "Getting caps of srcpad peer");
|
GST_DEBUG_OBJECT (sel, "Getting caps of srcpad peer");
|
||||||
caps = gst_pad_peer_get_caps (sel->srcpad);
|
caps = gst_pad_peer_get_caps_reffed (sel->srcpad);
|
||||||
if (caps == NULL)
|
if (caps == NULL)
|
||||||
caps = gst_caps_new_any ();
|
caps = gst_caps_new_any ();
|
||||||
|
|
||||||
|
@ -1166,7 +1166,7 @@ gst_input_selector_getcaps (GstPad * pad)
|
||||||
GST_DEBUG_PAD_NAME (pad), GST_DEBUG_PAD_NAME (otherpad));
|
GST_DEBUG_PAD_NAME (pad), GST_DEBUG_PAD_NAME (otherpad));
|
||||||
/* if the peer has caps, use those. If the pad is not linked, this function
|
/* if the peer has caps, use those. If the pad is not linked, this function
|
||||||
* returns NULL and we return ANY */
|
* returns NULL and we return ANY */
|
||||||
if (!(caps = gst_pad_peer_get_caps (otherpad)))
|
if (!(caps = gst_pad_peer_get_caps_reffed (otherpad)))
|
||||||
caps = gst_caps_new_any ();
|
caps = gst_caps_new_any ();
|
||||||
gst_object_unref (otherpad);
|
gst_object_unref (otherpad);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue