aggregator tests: fix seek event seqnums

In
https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/207,
aggregator starts ignoring seek events with duplicate seqnums. We thus
need to update the seqnum of events when reusing them multiple times.
This commit is contained in:
Mathieu Duponchelle 2019-07-19 18:52:02 +02:00
parent 509d4c31f0
commit f72e71903a
2 changed files with 7 additions and 0 deletions

View file

@ -389,6 +389,7 @@ test_play_twice_message_received (GstBus * bus, GstMessage * message,
/* prepare playing again */
set_state_and_wait (bin, GST_STATE_PAUSED);
gst_event_set_seqnum (play_seek_event, gst_util_seqnum_next ());
res = gst_element_send_event (bin, gst_event_ref (play_seek_event));
fail_unless (res == TRUE, NULL);
@ -443,6 +444,7 @@ GST_START_TEST (test_play_twice)
/* prepare playing */
set_state_and_wait (bin, GST_STATE_PAUSED);
gst_event_set_seqnum (play_seek_event, gst_util_seqnum_next ());
res = gst_element_send_event (bin, gst_event_ref (play_seek_event));
fail_unless (res == TRUE, NULL);
@ -505,6 +507,7 @@ GST_START_TEST (test_play_twice_then_add_and_play_again)
/* prepare playing */
set_state_and_wait (bin, GST_STATE_PAUSED);
gst_event_set_seqnum (play_seek_event, gst_util_seqnum_next ());
res = gst_element_send_event (bin, gst_event_ref (play_seek_event));
fail_unless (res == TRUE, NULL);
@ -659,6 +662,7 @@ GST_START_TEST (test_live_seeking)
/* prepare playing */
set_state_and_wait (bin, GST_STATE_PAUSED);
gst_event_set_seqnum (play_seek_event, gst_util_seqnum_next ());
res = gst_element_send_event (bin, gst_event_ref (play_seek_event));
fail_unless (res == TRUE, NULL);

View file

@ -663,6 +663,7 @@ test_play_twice_message_received (GstBus * bus, GstMessage * message,
GST_CLOCK_TIME_NONE);
ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
gst_event_set_seqnum (play_seek_event, gst_util_seqnum_next ());
res = gst_element_send_event (GST_ELEMENT (bin),
gst_event_ref (play_seek_event));
fail_unless (res == TRUE, NULL);
@ -740,6 +741,7 @@ GST_START_TEST (test_play_twice)
GST_CLOCK_TIME_NONE);
ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
gst_event_set_seqnum (play_seek_event, gst_util_seqnum_next ());
res = gst_element_send_event (bin, gst_event_ref (play_seek_event));
fail_unless (res == TRUE, NULL);
@ -829,6 +831,7 @@ GST_START_TEST (test_play_twice_then_add_and_play_again)
GST_CLOCK_TIME_NONE);
ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
gst_event_set_seqnum (play_seek_event, gst_util_seqnum_next ());
res = gst_element_send_event (bin, gst_event_ref (play_seek_event));
fail_unless (res == TRUE, NULL);