mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
Don't leak othercaps in link function (fixes #167878)
Original commit message from CVS: Don't leak othercaps in link function (fixes #167878)
This commit is contained in:
parent
4190810daf
commit
797a080e39
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue