diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-12-08 15:24:43 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-12-08 15:24:43 +0100 |
commit | 25fc43487bf9cc6de809c74101a3b0466532484d (patch) | |
tree | 64419a162a834de3d00dd4c8f184a45e3ee90ae4 /libs | |
parent | c2b0e9de25ac01be90df5d2310cc5fd425a64f09 (diff) |
basesink: Allow update NEWSEGMENT events after EOS
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.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gst/base/gstbasesink.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index 6ba622da6..f9fcb56d6 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -3140,6 +3140,7 @@ gst_base_sink_event (GstPad * pad, GstEvent * event) case GST_EVENT_NEWSEGMENT: { GstFlowReturn ret; + gboolean update; GST_DEBUG_OBJECT (basesink, "newsegment %p", event); @@ -3147,7 +3148,10 @@ gst_base_sink_event (GstPad * pad, GstEvent * 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); |