mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
rtpmux: Unref pad template caps after usage
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734473
This commit is contained in:
parent
421b00cd17
commit
1a35bf9647
1 changed files with 8 additions and 5 deletions
|
@ -632,21 +632,24 @@ gst_rtp_mux_getcaps (GstPad * pad, GstRTPMux * mux, GstCaps * filter)
|
||||||
GstIteratorResult res;
|
GstIteratorResult res;
|
||||||
GstCaps *peercaps;
|
GstCaps *peercaps;
|
||||||
GstCaps *othercaps;
|
GstCaps *othercaps;
|
||||||
|
GstCaps *tcaps;
|
||||||
|
|
||||||
peercaps = gst_pad_peer_query_caps (mux->srcpad, filter);
|
peercaps = gst_pad_peer_query_caps (mux->srcpad, filter);
|
||||||
|
|
||||||
if (peercaps) {
|
if (peercaps) {
|
||||||
othercaps = gst_caps_intersect_full (peercaps,
|
tcaps = gst_pad_get_pad_template_caps (pad);
|
||||||
gst_pad_get_pad_template_caps (pad), GST_CAPS_INTERSECT_FIRST);
|
othercaps = gst_caps_intersect_full (peercaps, tcaps,
|
||||||
|
GST_CAPS_INTERSECT_FIRST);
|
||||||
gst_caps_unref (peercaps);
|
gst_caps_unref (peercaps);
|
||||||
} else {
|
} else {
|
||||||
|
tcaps = gst_pad_get_pad_template_caps (mux->srcpad);
|
||||||
if (filter)
|
if (filter)
|
||||||
othercaps = gst_caps_intersect_full (filter,
|
othercaps = gst_caps_intersect_full (filter, tcaps,
|
||||||
gst_pad_get_pad_template_caps (mux->srcpad),
|
|
||||||
GST_CAPS_INTERSECT_FIRST);
|
GST_CAPS_INTERSECT_FIRST);
|
||||||
else
|
else
|
||||||
othercaps = gst_caps_copy (gst_pad_get_pad_template_caps (mux->srcpad));
|
othercaps = gst_caps_copy (tcaps);
|
||||||
}
|
}
|
||||||
|
gst_caps_unref (tcaps);
|
||||||
|
|
||||||
clear_caps (othercaps, FALSE);
|
clear_caps (othercaps, FALSE);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue