mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
gst/gstpadtemplate.c: The old behaviour was that gst_pad_template_new() takes ownership of the caps. As we now call g...
Original commit message from CVS: * gst/gstpadtemplate.c: The old behaviour was that gst_pad_template_new() takes ownership of the caps. As we now call g_object_new() which calls g_object_set() and which copies the caps, we have to unref them to not leak them. Fixes make valgrid for me.
This commit is contained in:
parent
4eebee56fd
commit
29f2239a89
2 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2008-08-28 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
|
* gst/gstpadtemplate.c:
|
||||||
|
The old behaviour was that gst_pad_template_new() takes ownership of
|
||||||
|
the caps. As we now call g_object_new() which calls g_object_set() and
|
||||||
|
which copies the caps, we have to unref them to not leak them. Fixes
|
||||||
|
make valgrid for me.
|
||||||
|
|
||||||
2008-08-28 Stefan Kost <ensonic@users.sf.net>
|
2008-08-28 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* gst/gsturi.c:
|
* gst/gsturi.c:
|
||||||
|
|
|
@ -388,6 +388,9 @@ gst_pad_template_new (const gchar * name_template,
|
||||||
"name", name_template, "name-template", name_template,
|
"name", name_template, "name-template", name_template,
|
||||||
"direction", direction, "presence", presence, "caps", caps, NULL);
|
"direction", direction, "presence", presence, "caps", caps, NULL);
|
||||||
|
|
||||||
|
if (caps)
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue