aggregator: Don't automatically adjust segment if subclass provided one

On the first buffer the base class would update the segment position
based on the start-time-selection. If the subclass provides its own
segment this will caused unexpected behaviour and override segment
information that was explicitly set by the subclass.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/600>
This commit is contained in:
Sebastian Dröge 2020-08-20 10:54:12 +03:00 committed by GStreamer Merge Bot
parent e97c520f06
commit 070f663ae1

View file

@ -3611,6 +3611,9 @@ gst_aggregator_update_segment (GstAggregator * self, const GstSegment * segment)
GST_OBJECT_LOCK (self);
GST_AGGREGATOR_PAD (self->srcpad)->segment = *segment;
self->priv->send_segment = TRUE;
/* we have a segment from the subclass now and really shouldn't override
* anything in that segment anymore, like the segment.position */
self->priv->first_buffer = FALSE;
GST_OBJECT_UNLOCK (self);
}