From 7bd439efb57388272751570be964dbee16912dd1 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Wed, 19 Jul 2017 12:38:03 +0200 Subject: [PATCH] qtdemux: preferably send open-ended segment rather than repeated segment events --- gst/isomp4/qtdemux.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 85ed89e..04f4fff 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -3053,7 +3053,11 @@ check_update_duration (GstQTDemux * qtdemux, GstClockTime duration) "Updating stream #%d duration to %" GST_TIME_FORMAT, i, GST_TIME_ARGS (duration)); stream->duration = movdur; - if (stream->dummy_segment) { + /* internal duration tracking state has been updated above, so */ + /* preserve an open-ended dummy segment rather than repeatedly updating + * it and spamming downstream accordingly with segment events */ + if (stream->dummy_segment && + GST_CLOCK_TIME_IS_VALID (stream->segments[0].duration)) { /* Update all dummy values to new duration */ stream->segments[0].stop_time = duration; stream->segments[0].duration = duration; -- 2.7.4