From f6a5f4fa71040613c1c967288d86be5a3814a799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 16 Dec 2008 12:37:15 +0000 Subject: tests/check/elements/mxfdemux.*: Make sure the main loop is already running when handling the EOS event in pull mode.... Original commit message from CVS: * tests/check/elements/mxfdemux.c: (_sink_event): * tests/check/elements/mxfdemux.h: Make sure the main loop is already running when handling the EOS event in pull mode. This works around a race condition that can happen if the element goes into PLAYING, handles everything and sends EOS before the main loop is started. --- tests/check/elements/mxfdemux.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/check/elements/mxfdemux.c') diff --git a/tests/check/elements/mxfdemux.c b/tests/check/elements/mxfdemux.c index 18db0ffc..65c151ed 100644 --- a/tests/check/elements/mxfdemux.c +++ b/tests/check/elements/mxfdemux.c @@ -82,6 +82,10 @@ static gboolean _sink_event (GstPad * pad, GstEvent * event) { if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) { + if (loop) { + while (!g_main_loop_is_running (loop)); + } + have_eos = TRUE; if (loop) g_main_loop_quit (loop); -- cgit v1.2.1