mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:16:13 +00:00
rtpmux: Fix leak
Fixed a leak discovered by Laurent Glayal <spegle@yahoo.fr>
This commit is contained in:
parent
cc51f90c1a
commit
905aad3572
1 changed files with 4 additions and 3 deletions
|
@ -378,20 +378,21 @@ gst_rtp_mux_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
padpriv->have_clock_base = TRUE;
|
padpriv->have_clock_base = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
caps = gst_caps_copy (caps);
|
caps = gst_caps_make_writable (caps);
|
||||||
|
|
||||||
gst_caps_set_simple (caps,
|
gst_caps_set_simple (caps,
|
||||||
"clock-base", G_TYPE_UINT, rtp_mux->ts_base,
|
"clock-base", G_TYPE_UINT, rtp_mux->ts_base,
|
||||||
"seqnum-base", G_TYPE_UINT, rtp_mux->seqnum_base, NULL);
|
"seqnum-base", G_TYPE_UINT, rtp_mux->seqnum_base, NULL);
|
||||||
|
|
||||||
|
gst_caps_ref (caps);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (rtp_mux,
|
GST_DEBUG_OBJECT (rtp_mux,
|
||||||
"setting caps %" GST_PTR_FORMAT " on src pad..", caps);
|
"setting caps %" GST_PTR_FORMAT " on src pad..", caps);
|
||||||
ret = gst_pad_set_caps (rtp_mux->srcpad, caps);
|
ret = gst_pad_set_caps (rtp_mux->srcpad, caps);
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
gst_caps_replace (&padpriv->out_caps, caps);
|
gst_caps_replace (&padpriv->out_caps, caps);
|
||||||
else
|
gst_caps_unref (caps);
|
||||||
gst_caps_unref (caps);
|
|
||||||
|
|
||||||
out:
|
out:
|
||||||
gst_object_unref (rtp_mux);
|
gst_object_unref (rtp_mux);
|
||||||
|
|
Loading…
Reference in a new issue