max += self->priv->sub_latency_max;
our_latency = self->priv->latency;
- if (GST_CLOCK_TIME_IS_VALID (our_latency))
- min += our_latency;
+ else if (GST_CLOCK_TIME_IS_VALID (self->priv->sub_latency_max))
+ max = self->priv->sub_latency_max;
if (live)
*live = self->priv->latency_live;
if (GST_CLOCK_TIME_IS_VALID (self->priv->sub_latency_max)
&& GST_CLOCK_TIME_IS_VALID (data.max))
data.max += self->priv->sub_latency_max;
+ else if (GST_CLOCK_TIME_IS_VALID (self->priv->sub_latency_max))
+ data.max = self->priv->sub_latency_max;
if (data.live && GST_CLOCK_TIME_IS_VALID (our_latency) && data.min > data.max) {
GST_ELEMENT_WARNING (self, CORE, NEGOTIATION,