mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-18 04:05:34 +00:00
queue: Only calculate level if we have valid levels
Doing calculations with GST_CLOCK_STIME_NONE would result in completely bogus levels
This commit is contained in:
parent
7ea4152323
commit
922e048379
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue