mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-01 06:01:04 +00:00
validate: Actually accept rounding errors and small mistakes for position
WHen seeking in paused the position right after should be pretty much the exact one, but sometimes it can be a little different because of rounding issues and similare.
This commit is contained in:
parent
8518e08dbb
commit
f42f0724e5
1 changed files with 7 additions and 3 deletions
|
@ -704,9 +704,13 @@ _check_position (GstValidateScenario * scenario, gdouble rate,
|
|||
}
|
||||
|
||||
if (priv->seeked_in_pause && priv->seek_flags & GST_SEEK_FLAG_ACCURATE) {
|
||||
if ((rate > 0 && position != priv->segment_start) ||
|
||||
(rate < 0 && position != priv->segment_stop)) {
|
||||
GST_VALIDATE_REPORT (scenario, QUERY_POSITION_OUT_OF_SEGMENT,
|
||||
if ((rate > 0 && (position >= priv->segment_start + priv->seek_pos_tol ||
|
||||
position < MIN (0,
|
||||
((gint64) priv->segment_start - priv->seek_pos_tol))))
|
||||
|| (rate < 0 && (position > priv->segment_start + priv->seek_pos_tol
|
||||
|| position < MIN (0,
|
||||
(gint64) priv->segment_start - priv->seek_pos_tol)))) {
|
||||
GST_VALIDATE_REPORT (scenario, EVENT_SEEK_RESULT_POSITION_WRONG,
|
||||
"Reported position after accurate seek in PAUSED state should be exactlty"
|
||||
" what the user asked for %" GST_TIME_FORMAT " != %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (position), GST_TIME_ARGS (priv->segment_start));
|
||||
|
|
Loading…
Reference in a new issue