From 4946cc5e7f57b957cff89f7d0bf6e07bfd8768b0 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Tue, 8 Nov 2011 14:31:34 +0100 Subject: [PATCH] qtdemux: also set segment stop at startup rather than only post seek ... so as to ensure consistent playback with or without seek, especially in presence of some bogus edit list entries. --- gst/isomp4/qtdemux.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 4a9463a987..1b7caf3da4 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -8867,8 +8867,13 @@ qtdemux_parse_tree (GstQTDemux * qtdemux) /* set duration in the segment info */ gst_qtdemux_get_duration (qtdemux, &duration); - if (duration) + if (duration) { gst_segment_set_duration (&qtdemux->segment, GST_FORMAT_TIME, duration); + /* also do not exceed duration; stop is set that way post seek anyway, + * and segment activation falls back to duration, + * whereas loop only checks stop, so let's align this here as well */ + qtdemux->segment.stop = duration; + } /* parse all traks */ trak = qtdemux_tree_get_child_by_type (qtdemux->moov_node, FOURCC_trak);