gst/playback/gstdecodebin2.c: Dont leak ghostpad. Fixes #475451.

Original commit message from CVS:
* gst/playback/gstdecodebin2.c:
Dont leak ghostpad. Fixes #475451.
This commit is contained in:
Stefan Kost 2007-11-09 15:54:45 +00:00
parent 905945738d
commit 1c2fae7f8b
2 changed files with 15 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2007-11-09 Stefan Kost <ensonic@users.sf.net>
* gst/playback/gstdecodebin2.c:
Dont leak ghostpad. Fixes #475451.
2007-11-09 Wim Taymans <wim.taymans@gmail.com>
* docs/design/design-decodebin.txt:

View file

@ -2097,6 +2097,16 @@ gst_decode_group_free (GstDecodeGroup * group)
GST_LOG ("group %p", group);
GROUP_MUTEX_LOCK (group);
/* free ghost pads */
if (group == group->dbin->activegroup) {
for (tmp = group->ghosts; tmp; tmp = g_list_next (tmp))
gst_element_remove_pad (GST_ELEMENT (group->dbin), (GstPad *) tmp->data);
g_list_free (group->ghosts);
group->ghosts = NULL;
}
/* Clear all GstDecodePad */
for (tmp = group->endpads; tmp; tmp = g_list_next (tmp)) {
GstDecodePad *dpad = (GstDecodePad *) tmp->data;