From: <en...@ke...> - 2009-11-21 15:56:32
|
Module: gst-plugins-base Branch: master Commit: 3d73a7458a7030470f94aed4921d9256c0f0c250 URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=3d73a7458a7030470f94aed4921d9256c0f0c250 Author: Stefan Kost <en...@us...> Date: Sat Oct 10 00:32:04 2009 +0300 adder: make events succeed, if they succed on atleast one pad --- gst/adder/gstadder.c | 4 ++-- tests/check/elements/adder.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index 97420d3..1d17d0b 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -609,7 +609,6 @@ forward_event_func (GstPad * pad, GValue * ret, EventData * data) gst_event_ref (event); GST_LOG_OBJECT (pad, "About to send event %s", GST_EVENT_TYPE_NAME (event)); if (!gst_pad_push_event (pad, event)) { - g_value_set_boolean (ret, FALSE); GST_WARNING_OBJECT (pad, "Sending event %p (%s) failed.", event, GST_EVENT_TYPE_NAME (event)); /* quick hack to unflush the pads, ideally we need a way to just unflush @@ -617,6 +616,7 @@ forward_event_func (GstPad * pad, GValue * ret, EventData * data) if (data->flush) gst_pad_send_event (pad, gst_event_new_flush_stop ()); } else { + g_value_set_boolean (ret, TRUE); GST_LOG_OBJECT (pad, "Sent event %p (%s).", event, GST_EVENT_TYPE_NAME (event)); } @@ -648,7 +648,7 @@ forward_event (GstAdder * adder, GstEvent * event, gboolean flush) data.flush = flush; g_value_init (&vret, G_TYPE_BOOLEAN); - g_value_set_boolean (&vret, TRUE); + g_value_set_boolean (&vret, FALSE); it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (adder)); while (TRUE) { ires = gst_iterator_fold (it, (GstIteratorFoldFunction) forward_event_func, diff --git a/tests/check/elements/adder.c b/tests/check/elements/adder.c index b5969f4..243e3b6 100644 --- a/tests/check/elements/adder.c +++ b/tests/check/elements/adder.c @@ -531,7 +531,7 @@ GST_START_TEST (test_live_seeking) fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL); res = gst_element_send_event (bin, gst_event_ref (play_seek_event)); -#if 0 +#if 1 fail_unless (res == TRUE, NULL); #else /* adder is picky, if a single seek fails it totaly fails */ |