From 90993179d2342a2d3bb47d44e0cd9fb9db6628d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Tue, 28 Apr 2009 15:58:41 -0400 Subject: rtpmux: Fix leak Fixed a leak discovered by Laurent Glayal --- gst/rtpmux/gstrtpmux.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gst') diff --git a/gst/rtpmux/gstrtpmux.c b/gst/rtpmux/gstrtpmux.c index d7a9b47c..e62f8a14 100644 --- a/gst/rtpmux/gstrtpmux.c +++ b/gst/rtpmux/gstrtpmux.c @@ -378,20 +378,21 @@ gst_rtp_mux_setcaps (GstPad * pad, GstCaps * caps) padpriv->have_clock_base = TRUE; } - caps = gst_caps_copy (caps); + caps = gst_caps_make_writable (caps); gst_caps_set_simple (caps, "clock-base", G_TYPE_UINT, rtp_mux->ts_base, "seqnum-base", G_TYPE_UINT, rtp_mux->seqnum_base, NULL); + gst_caps_ref (caps); + GST_DEBUG_OBJECT (rtp_mux, "setting caps %" GST_PTR_FORMAT " on src pad..", caps); ret = gst_pad_set_caps (rtp_mux->srcpad, caps); if (ret) gst_caps_replace (&padpriv->out_caps, caps); - else - gst_caps_unref (caps); + gst_caps_unref (caps); out: gst_object_unref (rtp_mux); -- cgit v1.2.1