diff --git a/ChangeLog b/ChangeLog index 90911e2df8..d7695e08c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-11-09 Stefan Kost + + * gst/playback/gstdecodebin2.c: + Dont leak ghostpad. Fixes #475451. + 2007-11-09 Wim Taymans * docs/design/design-decodebin.txt: diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 33984ee7c7..64b0c30f03 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -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;