rtpmux: Return correct value from the event handler

20070525123116-f3f1e-131b37b5f4521618fe2f1320409a47e65b35ad2d.gz
This commit is contained in:
Zeeshan Ali 2007-05-25 12:31:16 +00:00 committed by Tim-Philipp Müller
parent ed76f67e96
commit de40874670

View file

@ -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;
GstElement *rtp_mux;
GstIterator *iter;
GstPad *sinkpad;
gboolean result = FALSE;
orig = pads = gst_pad_get_internal_links (pad);
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;