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;