aggregator: Initialize source pad segment position to -1 when resetting

This allows start-time selection in gst_aggregator_pad_chain_internal()
to actually work as that code assumes it to be -1 for actually
overriding the value.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/500
This commit is contained in:
Sebastian Dröge 2020-01-23 19:27:14 +02:00
parent f018b4eddc
commit 48f14c5e5e

View file

@ -519,6 +519,9 @@ gst_aggregator_reset_flow_values (GstAggregator * self)
self->priv->send_segment = TRUE;
gst_segment_init (&GST_AGGREGATOR_PAD (self->srcpad)->segment,
GST_FORMAT_TIME);
/* Initialize to -1 so we set it to the start position once the first buffer
* is handled in gst_aggregator_pad_chain_internal() */
GST_AGGREGATOR_PAD (self->srcpad)->segment.position = -1;
self->priv->first_buffer = TRUE;
GST_OBJECT_UNLOCK (self);
}