qtdemux: do not update segment.stop is it is not a valid time

Otherwise it overflows and starts having a meaningful and wrong value.

https://bugzilla.gnome.org/show_bug.cgi?id=752603
This commit is contained in:
Thiago Santos 2018-05-13 21:59:49 -07:00
parent 9c514f9c7c
commit 364a921d3f

View file

@ -4917,8 +4917,10 @@ gst_qtdemux_stream_update_segment (GstQTDemux * qtdemux, QtDemuxStream * stream,
stream->segment.rate = rate;
stream->segment.start = start + QTSTREAMTIME_TO_GSTTIME (stream,
stream->cslg_shift) + min_ts;
stream->segment.stop = stop + QTSTREAMTIME_TO_GSTTIME (stream,
stream->cslg_shift) + min_ts;
if (GST_CLOCK_TIME_IS_VALID (stop)) {
stream->segment.stop = stop + QTSTREAMTIME_TO_GSTTIME (stream,
stream->cslg_shift) + min_ts;
}
stream->segment.time = time + min_ts;
stream->segment.position = stream->segment.start + min_ts;