summaryrefslogtreecommitdiffstats
path: root/gst/law/mulaw-decode.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/law/mulaw-decode.c')
-rw-r--r--gst/law/mulaw-decode.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gst/law/mulaw-decode.c b/gst/law/mulaw-decode.c
index a3544a6c..35c365f1 100644
--- a/gst/law/mulaw-decode.c
+++ b/gst/law/mulaw-decode.c
@@ -95,6 +95,8 @@ mulawdec_link (GstPad * pad, const GstCaps * caps)
GstStructure *structure;
const GValue *rate, *chans;
GstCaps *base_caps;
+ GstPadLinkReturn link_return;
+
structure = gst_caps_get_structure (caps, 0);
rate = gst_structure_get_value (structure, "rate");
@@ -117,7 +119,12 @@ mulawdec_link (GstPad * pad, const GstCaps * caps)
gst_structure_set_value (structure, "rate", rate);
gst_structure_set_value (structure, "channels", chans);
- return gst_pad_try_set_caps (otherpad, base_caps);
+ link_return = gst_pad_try_set_caps (otherpad, base_caps);
+
+ gst_caps_free (base_caps);
+
+ return link_return;
+
}
GType