summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-04-28 15:58:41 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-04-28 15:59:37 -0400
commit905aad3572e9c82dd731718e09ca02b0916e8882 (patch)
tree44a7a417a9b5abc1c9bda1eb282ec6f4ae605238 /gst
parentcc51f90c1a74bc8bb61ff1121720d1ea36f074e5 (diff)
downloadgst-plugins-bad-905aad3572e9c82dd731718e09ca02b0916e8882.tar.gz
gst-plugins-bad-905aad3572e9c82dd731718e09ca02b0916e8882.tar.bz2
gst-plugins-bad-905aad3572e9c82dd731718e09ca02b0916e8882.zip
rtpmux: Fix leak
Fixed a leak discovered by Laurent Glayal <spegle@yahoo.fr>
Diffstat (limited to 'gst')
-rw-r--r--gst/rtpmux/gstrtpmux.c7
1 files changed, 4 insertions, 3 deletions
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);