pulseaudiosink: Use new GstIterator API correctly
authorThiago Santos <thiago.sousa.santos@collabora.com>
Wed, 12 Oct 2011 10:29:30 +0000 (07:29 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.com>
Wed, 12 Oct 2011 10:36:09 +0000 (07:36 -0300)
GstIterator now uses GValue, use it correctly.

ext/pulse/pulseaudiosink.c

index b50f934..941b9b6 100644 (file)
@@ -310,12 +310,15 @@ static GstPad *
 get_proxypad (GstPad * sinkpad)
 {
   GstIterator *iter = NULL;
+  GValue res = { 0 };
   GstPad *proxypad = NULL;
 
   iter = gst_pad_iterate_internal_links (sinkpad);
   if (iter) {
-    if (gst_iterator_next (iter, (gpointer) & proxypad) != GST_ITERATOR_OK)
-      proxypad = NULL;
+    if (gst_iterator_next (iter, &res) == GST_ITERATOR_OK) {
+      proxypad = g_value_dup_object (&res);
+      g_value_reset (&res);
+    }
     gst_iterator_free (iter);
   }