diff options
author | Zeeshan Ali <first.last@nokia.com> | 2007-05-25 12:31:16 +0000 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-02-21 17:48:53 +0100 |
commit | b6dc9f9bf2befbd0a3606e99fe1ec744b11c245a (patch) | |
tree | 5d3fc796fab0a389b27697db3bf6f1023460f0cd /gst/rtpmux | |
parent | 30a1e0151802e78d6b72f9ca29213d91991c4e50 (diff) | |
download | gst-plugins-bad-b6dc9f9bf2befbd0a3606e99fe1ec744b11c245a.tar.gz gst-plugins-bad-b6dc9f9bf2befbd0a3606e99fe1ec744b11c245a.tar.bz2 gst-plugins-bad-b6dc9f9bf2befbd0a3606e99fe1ec744b11c245a.zip |
[MOVED FROM GST-P-FARSIGHT] Return correct value from the event handler
20070525123116-f3f1e-131b37b5f4521618fe2f1320409a47e65b35ad2d.gz
Diffstat (limited to 'gst/rtpmux')
-rw-r--r-- | gst/rtpmux/gstrtpmux.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/gst/rtpmux/gstrtpmux.c b/gst/rtpmux/gstrtpmux.c index 08ff73f8..7fa13ab3 100644 --- a/gst/rtpmux/gstrtpmux.c +++ b/gst/rtpmux/gstrtpmux.c @@ -184,21 +184,24 @@ gst_rtp_mux_class_init (GstRTPMuxClass * klass) static gboolean gst_rtp_mux_src_event (GstPad * pad, GstEvent * event) { - gboolean result = TRUE; - GList *orig, *pads; - - orig = pads = gst_pad_get_internal_links (pad); + GstElement *rtp_mux; + GstIterator *iter; + GstPad *sinkpad; + gboolean result = FALSE; + + rtp_mux = gst_pad_get_parent_element (pad); + g_return_val_if_fail (rtp_mux != NULL, FALSE); - while (pads) { - GstPad *eventpad = GST_PAD_CAST (pads->data); - pads = g_list_next (pads); + 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 (eventpad, event); + result = gst_pad_push_event (sinkpad, event); + gst_object_unref (sinkpad); + if (result) + break; } - g_list_free (orig); - gst_event_unref (event); return result; |