summaryrefslogtreecommitdiffstats
path: root/gst/law/alaw-encode.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-02-08 10:58:13 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-02-08 10:58:13 +0000
commite23f9bb4e9556fecf6046c6d8f19b6c2cb6b2f30 (patch)
tree0178fd2eb6aa6a7fbc607d69a389f9e467ab68c9 /gst/law/alaw-encode.c
parentb2a741ec312849f514c7d70cd7784182bfd5bb07 (diff)
gst/law/: Fix caps memleaks (#166600).
Original commit message from CVS: Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net> * gst/law/alaw-decode.c: (alawdec_link): * gst/law/alaw-encode.c: (alawenc_link): * gst/law/mulaw-decode.c: (mulawdec_link): * gst/law/mulaw-encode.c: (mulawenc_link): Fix caps memleaks (#166600).
Diffstat (limited to 'gst/law/alaw-encode.c')
-rw-r--r--gst/law/alaw-encode.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gst/law/alaw-encode.c b/gst/law/alaw-encode.c
index e3e65000..b4cd6432 100644
--- a/gst/law/alaw-encode.c
+++ b/gst/law/alaw-encode.c
@@ -160,6 +160,7 @@ alawenc_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");
@@ -182,7 +183,11 @@ alawenc_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