{
GstIterator *it = gst_element_iterate_src_pads (suburidecodebin);
GstPad *sinkpad;
+ GValue item = { 0, };
- if (it && gst_iterator_next (it, (gpointer) & sinkpad) == GST_ITERATOR_OK
- && sinkpad) {
+ if (it && gst_iterator_next (it, &item) == GST_ITERATOR_OK
+ && ((sinkpad = g_value_get_object (&item)) != NULL)) {
GstEvent *event;
event =
GST_DEBUG_OBJECT (suburidecodebin, "Seeking to the beginning failed!");
}
- gst_object_unref (sinkpad);
+ g_value_unset (&item);
}
if (it)
{
GstIterator *it = gst_element_iterate_src_pads (suburidecodebin);
gboolean done = FALSE;
+ GValue item = { 0, };
GST_DEBUG_OBJECT (suburidecodebin, "Blocking suburidecodebin: %d", block);
while (!done) {
GstPad *sinkpad;
- switch (gst_iterator_next (it, (gpointer) & sinkpad)) {
+ switch (gst_iterator_next (it, &item)) {
case GST_ITERATOR_OK:
+ sinkpad = g_value_get_object (&item);
gst_pad_set_blocked_async (sinkpad, block, _suburidecodebin_blocked_cb,
NULL);
- gst_object_unref (sinkpad);
+ g_value_reset (&item);
break;
case GST_ITERATOR_DONE:
done = TRUE;
break;
}
}
+ g_value_unset (&item);
gst_iterator_free (it);
}
GstMessage *new_msg;
GstIterator *it;
gboolean done = FALSE;
+ GValue item = { 0, };
gst_message_parse_error (msg, &err, &debug);
new_msg = gst_message_new_warning (msg->src, err, debug);
GstPad *p = NULL;
GstIteratorResult res;
- res = gst_iterator_next (it, (gpointer) & p);
+ res = gst_iterator_next (it, &item);
switch (res) {
case GST_ITERATOR_DONE:
done = TRUE;
break;
case GST_ITERATOR_OK:
+ p = g_value_get_object (&item);
pad_removed_cb (NULL, p, group);
- gst_object_unref (p);
+ g_value_reset (&item);
break;
case GST_ITERATOR_RESYNC:
break;
}
}
+ g_value_unset (&item);
if (it)
gst_iterator_free (it);