From 48f14c5e5ea1420795984d28bed1cf9fd7fb2711 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 23 Jan 2020 19:27:14 +0200 Subject: [PATCH] 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 --- libs/gst/base/gstaggregator.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/gst/base/gstaggregator.c b/libs/gst/base/gstaggregator.c index fb2100b..b22a5f7 100644 --- a/libs/gst/base/gstaggregator.c +++ b/libs/gst/base/gstaggregator.c @@ -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); } -- 2.7.4