From 797a080e39422cd3c987bd8f837ae1c41b586ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 19 Feb 2005 20:01:36 +0000 Subject: [PATCH] Don't leak othercaps in link function (fixes #167878) Original commit message from CVS: Don't leak othercaps in link function (fixes #167878) --- ChangeLog | 8 ++++++++ gst/audioconvert/bufferframesconvert.c | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0081dde187..0fbd2c1817 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-02-19 Martin Holters + + Reviewed by: Tim-Philipp Müller + + * gst/audioconvert/bufferframesconvert.c: + (buffer_frames_convert_link): + Don't leak othercaps. (fixes #167878) + 2005-02-19 Arwed v. Merkatz > * configure.ac: diff --git a/gst/audioconvert/bufferframesconvert.c b/gst/audioconvert/bufferframesconvert.c index b1c3168920..122b553634 100644 --- a/gst/audioconvert/bufferframesconvert.c +++ b/gst/audioconvert/bufferframesconvert.c @@ -266,9 +266,9 @@ buffer_frames_convert_link (GstPad * pad, const GstCaps * caps) gst_caps_set_simple (othercaps, "buffer-frames", GST_TYPE_INT_RANGE, 0, G_MAXINT, NULL); ret = gst_pad_try_set_caps_nonfixed (otherpad, othercaps); + gst_caps_free (othercaps); if (GST_PAD_LINK_FAILED (ret)) return ret; - gst_caps_free (othercaps); othercaps = gst_caps_copy (gst_pad_get_negotiated_caps (otherpad)); /* it's ok, let's record our data */ @@ -284,6 +284,7 @@ buffer_frames_convert_link (GstPad * pad, const GstCaps * caps) gst_structure_get_int (sinkstructure, "channels", &numchannels); this->in_buffer_samples *= numchannels; this->out_buffer_samples *= numchannels; + gst_caps_free (othercaps); if (this->out_buffer_samples == 0) this->passthrough = TRUE;