diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-09-23 11:47:14 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-09-23 11:47:14 +0200 |
commit | cba26c9ed901e9cce4812519db5f04ac0d198f5d (patch) | |
tree | 7fcbf9dc3eecf82148754247a7a806de5bab92d9 /tests | |
parent | 3e4b4eb59bb691c9e1c00a7a5268e68d4444bc7d (diff) |
tests: handle unscheduled entries correctly
Make the testclock return GST_CLOCK_UNSCHEDULED when an unscheduled entry is
used for gst_clock_wait() or gst_clock_wait_async().
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=708605
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check/libs/gsttestclock.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/check/libs/gsttestclock.c b/tests/check/libs/gsttestclock.c index de59031b5..ab0c13d87 100644 --- a/tests/check/libs/gsttestclock.c +++ b/tests/check/libs/gsttestclock.c @@ -513,12 +513,17 @@ GST_START_TEST (test_single_shot_sync_unschedule) GstTestClock *test_clock; GstClockID clock_id; GtuClockWaitContext *wait_ctx; + gboolean wait_complete = FALSE; clock = gst_test_clock_new_with_start_time (GST_SECOND); test_clock = GST_TEST_CLOCK (clock); clock_id = gst_clock_new_single_shot_id (clock, GST_SECOND); gst_clock_id_unschedule (clock_id); + /* any wait should timeout immediately */ + g_assert (gst_clock_id_wait_async (clock_id, test_async_wait_cb, + &wait_complete, NULL) == GST_CLOCK_UNSCHEDULED); + g_assert (gst_clock_id_wait (clock_id, NULL) == GST_CLOCK_UNSCHEDULED); gst_clock_id_unref (clock_id); clock_id = gst_clock_new_single_shot_id (clock, 2 * GST_SECOND); |