diff options
author | Zeeshan Ali <first.last@nokia.com> | 2007-05-28 12:28:08 +0000 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-02-21 17:48:53 +0100 |
commit | 5d86b44cd5b00002dd24e26f020c40275485ef75 (patch) | |
tree | bdfa4f5e30123e05798027c1abfbd34411fa5a8a /gst | |
parent | b6dc9f9bf2befbd0a3606e99fe1ec744b11c245a (diff) | |
download | gst-plugins-bad-5d86b44cd5b00002dd24e26f020c40275485ef75.tar.gz gst-plugins-bad-5d86b44cd5b00002dd24e26f020c40275485ef75.tar.bz2 gst-plugins-bad-5d86b44cd5b00002dd24e26f020c40275485ef75.zip |
[MOVED FROM GST-P-FARSIGHT] deal with all the gst_iterator_next() return values
20070528122808-f3f1e-d301644c3be7633ec6dc5e28596e9346d2da6a50.gz
Diffstat (limited to 'gst')
-rw-r--r-- | gst/rtpmux/gstrtpmux.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/gst/rtpmux/gstrtpmux.c b/gst/rtpmux/gstrtpmux.c index 7fa13ab3..675880a9 100644 --- a/gst/rtpmux/gstrtpmux.c +++ b/gst/rtpmux/gstrtpmux.c @@ -188,18 +188,30 @@ static gboolean gst_rtp_mux_src_event (GstPad * pad, GstIterator *iter; GstPad *sinkpad; gboolean result = FALSE; + gboolean done = FALSE; rtp_mux = gst_pad_get_parent_element (pad); g_return_val_if_fail (rtp_mux != NULL, FALSE); iter = gst_element_iterate_sink_pads (rtp_mux); - while (gst_iterator_next (iter, (gpointer) &sinkpad) == GST_ITERATOR_OK) { - gst_event_ref (event); - result = gst_pad_push_event (sinkpad, event); - gst_object_unref (sinkpad); - if (result) - break; + while (!done) { + switch (gst_iterator_next (iter, (gpointer) &sinkpad)) { + case GST_ITERATOR_OK: + gst_event_ref (event); + result = gst_pad_push_event (sinkpad, event); + gst_object_unref (sinkpad); + if (result) + done = TRUE; + break; + case GST_ITERATOR_RESYNC: + gst_iterator_resync (iter); + break; + case GST_ITERATOR_ERROR: + case GST_ITERATOR_DONE: + done = TRUE; + break; + } } gst_event_unref (event); |