fakesink: Update positions we're checking for after a state is lost

This commit is contained in:
Sebastian Dröge 2014-03-18 18:12:16 +01:00
parent ba943a82c0
commit 888cf0656d

View file

@ -794,10 +794,10 @@ GST_START_TEST (test_position)
fail_if (eret == FALSE); fail_if (eret == FALSE);
} }
/* this should now just report the stream time of the last buffer */ /* this should now just report the last stream time */
qret = gst_element_query_position (sink, GST_FORMAT_TIME, &qcur); qret = gst_element_query_position (sink, GST_FORMAT_TIME, &qcur);
fail_unless (qret == TRUE); fail_unless (qret == TRUE);
fail_unless (qcur == 2 * GST_SECOND); fail_unless (qcur >= 2 * GST_SECOND && qcur <= 3 * GST_SECOND);
{ {
GST_DEBUG ("sending flush_stop"); GST_DEBUG ("sending flush_stop");
@ -869,7 +869,7 @@ GST_START_TEST (test_position)
* record of that anywhere */ * record of that anywhere */
qret = gst_element_query_position (sink, GST_FORMAT_TIME, &qcur); qret = gst_element_query_position (sink, GST_FORMAT_TIME, &qcur);
fail_unless (qret == TRUE); fail_unless (qret == TRUE);
fail_unless (qcur >= 4 * GST_SECOND); fail_unless (qcur == 3 * GST_SECOND);
ret = gst_element_set_state (pipeline, GST_STATE_READY); ret = gst_element_set_state (pipeline, GST_STATE_READY);
fail_unless (ret == GST_STATE_CHANGE_SUCCESS); fail_unless (ret == GST_STATE_CHANGE_SUCCESS);