scenario: fix PAUSED position check

The way this was implemented was simply wrong, first of all checking
the position against the segment after a seek in PAUSED by a query
of the pipeline position is of limited interest, and can only work
in forward playback.

Furthermore the check was a huge blob of code that didn't even look
like it was pretending to do a good job at checking the position in
reverse playback.
This commit is contained in:
Mathieu Duponchelle 2019-07-26 02:28:42 +02:00
parent 93114b55ab
commit 7c255a9015

View file

@ -1639,14 +1639,9 @@ _check_position (GstValidateScenario * scenario, GstValidateAction * act,
if (priv->seeked_in_pause && priv->seek_flags & GST_SEEK_FLAG_ACCURATE &&
priv->seek_format == GST_FORMAT_TIME) {
if ((*rate > 0 && (*position >= priv->segment_start + priv->seek_pos_tol ||
*position < ((priv->segment_start <
priv->seek_pos_tol) ? 0 : priv->segment_start -
priv->seek_pos_tol)))
|| (*rate < 0 && (*position > priv->segment_start + priv->seek_pos_tol
|| *position < ((priv->segment_start <
priv->seek_pos_tol) ? 0 : priv->segment_start -
priv->seek_pos_tol)))) {
if (*rate > 0
&& (GstClockTime) ABS (GST_CLOCK_DIFF (*position,
priv->segment_start)) > priv->seek_pos_tol) {
priv->seeked_in_pause = FALSE;
GST_VALIDATE_REPORT (scenario, EVENT_SEEK_RESULT_POSITION_WRONG,
"Reported position after accurate seek in PAUSED state should be exactly"