From a362b844f858adad79d8818db118fe1d5ca0c675 Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Sun, 10 Jun 2012 12:41:12 -0400 Subject: [PATCH] gstelement: Start over if subclass removed the next pad too Fixes https://bugzilla.gnome.org/show_bug.cgi?id=677818 --- gst/gstelement.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst/gstelement.c b/gst/gstelement.c index 2962830..38f0ee4 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -2851,6 +2851,10 @@ gst_element_dispose (GObject * object) GST_CAT_DEBUG_OBJECT (GST_CAT_ELEMENT_PADS, element, "removing request pad %s:%s", GST_DEBUG_PAD_NAME (pad)); oclass->release_pad (element, pad); + + /* in case the release_pad function removed the next pad too */ + if (walk && g_list_position (element->pads, walk) == -1) + walk = element->pads; } } /* remove the remaining pads */ -- 2.7.4