summaryrefslogtreecommitdiffstats
path: root/gst/rtp/gstrtpL16pay.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/rtp/gstrtpL16pay.c')
-rw-r--r--gst/rtp/gstrtpL16pay.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/rtp/gstrtpL16pay.c b/gst/rtp/gstrtpL16pay.c
index 466e4b0a..f68425c0 100644
--- a/gst/rtp/gstrtpL16pay.c
+++ b/gst/rtp/gstrtpL16pay.c
@@ -171,13 +171,17 @@ gst_rtpL16pay_sinkconnect (GstPad * pad, const GstCaps * caps)
ret = gst_structure_get_int (structure, "rate", &rtpL16enc->frequency);
ret &= gst_structure_get_int (structure, "channels", &rtpL16enc->channels);
- if (!ret)
+ if (!ret) {
+ gst_object_unref (rtpL16enc);
return GST_PAD_LINK_REFUSED;
+ }
/* Pre-calculate what we can */
rtpL16enc->time_interval =
GST_SECOND / (2 * rtpL16enc->channels * rtpL16enc->frequency);
+ gst_object_unref (rtpL16enc);
+
return GST_PAD_LINK_OK;
}