iterator: resync to avoid infinite loop
authorStian Selnes <stian.selnes@tandberg.com>
Tue, 14 Dec 2010 15:06:46 +0000 (16:06 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 8 Apr 2011 12:43:21 +0000 (14:43 +0200)
gst/gstiterator.c

index d95a4b5..b99162b 100644 (file)
@@ -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 */