Commit 797a080e authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

Don't leak othercaps in link function (fixes #167878)

Original commit message from CVS:
Don't leak othercaps in link function (fixes #167878)
parent 4190810d
2005-02-19 Martin Holters <martin.holters@gmx.de>
Reviewed by: Tim-Philipp Müller <tim at centricular dot net>
* gst/audioconvert/bufferframesconvert.c:
(buffer_frames_convert_link):
Don't leak othercaps. (fixes #167878)
2005-02-19 Arwed v. Merkatz <v.merkatz@gmx.net>>
* configure.ac:
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment