pitch: fix latency reporting

When max is GST_CLOCK_TIME_NONE in the query, it should not
be set in the query handler, this otherwise could lead to
impossible situations, where the minimum latency ended up
greater than the maximum.

https://bugzilla.gnome.org/show_bug.cgi?id=796603
This commit is contained in:
Mathieu Duponchelle 2018-06-16 18:21:58 +02:00
parent 5f020be6cd
commit 0b03b47193

View file

@ -645,8 +645,6 @@ gst_pitch_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
min += pitch->min_latency;
if (max != GST_CLOCK_TIME_NONE)
max += pitch->max_latency;
else
max = pitch->max_latency;
GST_DEBUG ("Calculated total latency : min %"
GST_TIME_FORMAT " max %" GST_TIME_FORMAT,