From 922e048379480db16a16a3ce6bfbc48627fff611 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 23 Nov 2017 15:28:39 +0100 Subject: queue: Only calculate level if we have valid levels Doing calculations with GST_CLOCK_STIME_NONE would result in completely bogus levels --- plugins/elements/gstqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index 9c887c1c1..431dcdca6 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -547,7 +547,8 @@ update_time_level (GstQueue * queue) GST_LOG_OBJECT (queue, "sink %" GST_STIME_FORMAT ", src %" GST_STIME_FORMAT, GST_STIME_ARGS (sink_time), GST_STIME_ARGS (src_time)); - if (sink_time >= src_time) + if (GST_CLOCK_STIME_IS_VALID (src_time) + && GST_CLOCK_STIME_IS_VALID (sink_time) && sink_time >= src_time) queue->cur_level.time = sink_time - src_time; else queue->cur_level.time = 0; -- cgit v1.2.3