diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2005-02-08 10:58:13 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2005-02-08 10:58:13 +0000 |
commit | e23f9bb4e9556fecf6046c6d8f19b6c2cb6b2f30 (patch) | |
tree | 0178fd2eb6aa6a7fbc607d69a389f9e467ab68c9 | |
parent | b2a741ec312849f514c7d70cd7784182bfd5bb07 (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).
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | gst/law/alaw-decode.c | 7 | ||||
-rw-r--r-- | gst/law/alaw-encode.c | 7 | ||||
-rw-r--r-- | gst/law/mulaw-decode.c | 9 | ||||
-rw-r--r-- | gst/law/mulaw-encode.c | 7 |
5 files changed, 36 insertions, 4 deletions
@@ -1,3 +1,13 @@ +2005-02-08 Francis Labonte <francis_labonte@hotmail.com> + + 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). + 2005-02-08 Tim-Philipp Müller <tim at centricular dot net> * ext/tarkin/mem.h: diff --git a/gst/law/alaw-decode.c b/gst/law/alaw-decode.c index 2a3a1371..44a6cb84 100644 --- a/gst/law/alaw-decode.c +++ b/gst/law/alaw-decode.c @@ -118,6 +118,7 @@ alawdec_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"); @@ -140,7 +141,11 @@ alawdec_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 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 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 diff --git a/gst/law/mulaw-encode.c b/gst/law/mulaw-encode.c index 0166b30e..305165b8 100644 --- a/gst/law/mulaw-encode.c +++ b/gst/law/mulaw-encode.c @@ -94,6 +94,7 @@ mulawenc_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"); @@ -116,7 +117,11 @@ mulawenc_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 |