This allows demuxers to update the segment stop of an already
finished stream. This might be needed if some stream goes to
EOS before the duration of the longest stream is known to properly
set the segment stop of all streams to the same value in the end.
case GST_EVENT_NEWSEGMENT:
{
GstFlowReturn ret;
+ gboolean update;
GST_DEBUG_OBJECT (basesink, "newsegment %p", event);
if (G_UNLIKELY (basesink->flushing))
goto flushing;
- if (G_UNLIKELY (basesink->priv->received_eos)) {
+ gst_event_parse_new_segment_full (event, &update, NULL, NULL, NULL, NULL,
+ NULL, NULL);
+
+ if (G_UNLIKELY (basesink->priv->received_eos && !update)) {
/* we can't accept anything when we are EOS */
result = FALSE;
gst_event_unref (event);