validate:pipeline-monitor: Avoid wrong position issue

If the reported position or duration is NONE, do not check its
validity
This commit is contained in:
Thibault Saunier 2019-06-11 16:21:52 -04:00 committed by Mathieu Duponchelle
parent 035d37f762
commit f27e98caee

View file

@ -126,9 +126,9 @@ print_position (GstValidateMonitor * monitor)
goto done; goto done;
} }
if (position > duration) { if (GST_CLOCK_TIME_IS_VALID (duration) && GST_CLOCK_TIME_IS_VALID (position)
GST_VALIDATE_REPORT (monitor, && position > duration) {
QUERY_POSITION_SUPERIOR_DURATION, GST_VALIDATE_REPORT (monitor, QUERY_POSITION_SUPERIOR_DURATION,
"Reported position %" GST_TIME_FORMAT " > reported duration %" "Reported position %" GST_TIME_FORMAT " > reported duration %"
GST_TIME_FORMAT, GST_TIME_ARGS (position), GST_TIME_ARGS (duration)); GST_TIME_FORMAT, GST_TIME_ARGS (position), GST_TIME_ARGS (duration));
} }