mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 16:51:10 +00:00
aggregator: Be more aggressive with invalid replies to our latency query
https://bugzilla.gnome.org/show_bug.cgi?id=745768
This commit is contained in:
parent
9c49624610
commit
0656c2fc67
1 changed files with 11 additions and 7 deletions
|
@ -1129,15 +1129,19 @@ gst_aggregator_query_latency (GstAggregator * self, GstQuery * query)
|
|||
our_latency = self->priv->latency;
|
||||
|
||||
if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (min))) {
|
||||
GST_WARNING_OBJECT (self, "Invalid minimum latency, using 0");
|
||||
min = 0;
|
||||
GST_ERROR_OBJECT (self, "Invalid minimum latency %" GST_TIME_FORMAT
|
||||
". Please file a bug at " PACKAGE_BUGREPORT ".", GST_TIME_ARGS (min));
|
||||
SRC_UNLOCK (self);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (G_UNLIKELY (min > max)) {
|
||||
GST_WARNING_OBJECT (self, "Minimum latency is greater than maximum latency "
|
||||
"(%" G_GINT64_FORMAT " > %" G_GINT64_FORMAT "). "
|
||||
"Clamping it at the maximum latency", min, max);
|
||||
min = max;
|
||||
if (min > max && GST_CLOCK_TIME_IS_VALID (max)) {
|
||||
GST_ELEMENT_WARNING (self, CORE, CLOCK, (NULL),
|
||||
("Impossible to configure latency: max %" GST_TIME_FORMAT " < min %"
|
||||
GST_TIME_FORMAT ". Add queues or other buffering elements.",
|
||||
GST_TIME_ARGS (max), GST_TIME_ARGS (min)));
|
||||
SRC_UNLOCK (self);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
self->priv->latency_live = live;
|
||||
|
|
Loading…
Reference in a new issue