From c19f44e1d2c5094511bc1da42aad3751a04a499a Mon Sep 17 00:00:00 2001 From: Stian Selnes Date: Tue, 14 Dec 2010 16:06:46 +0100 Subject: [PATCH] iterator: resync to avoid infinite loop --- gst/gstiterator.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/gstiterator.c b/gst/gstiterator.c index d95a4b5a17..b99162b9e6 100644 --- a/gst/gstiterator.c +++ b/gst/gstiterator.c @@ -664,6 +664,8 @@ gst_iterator_find_custom (GstIterator * it, GCompareFunc func, res = gst_iterator_fold (it, (GstIteratorFoldFunction) find_custom_fold_func, &ret, &data); + if (res == GST_ITERATOR_RESYNC) + gst_iterator_resync (it); } while (res == GST_ITERATOR_RESYNC); /* no need to unset, it's just a pointer */