From a33e30cfc4e96a019da835eaa17b921c1516f071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 2 Nov 2021 18:38:39 +0200 Subject: [PATCH] qtdemux: Only adjust segment.stop by cslg_shift if stop is not -1 Part-of: --- subprojects/gst-plugins-good/gst/isomp4/qtdemux.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c index 9b6189c99d..41ce6b2323 100644 --- a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c +++ b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c @@ -4959,8 +4959,11 @@ gst_qtdemux_stream_update_segment (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->segment.rate = rate; stream->segment.start = start + QTSTREAMTIME_TO_GSTTIME (stream, stream->cslg_shift); - stream->segment.stop = stop + QTSTREAMTIME_TO_GSTTIME (stream, - stream->cslg_shift); + if (stop != -1) + stream->segment.stop = stop + QTSTREAMTIME_TO_GSTTIME (stream, + stream->cslg_shift); + else + stream->segment.stop = stop; stream->segment.time = time; stream->segment.position = stream->segment.start;