summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiagossantos@gmail.com>2018-05-13 21:59:49 -0700
committerThiago Santos <thiago@waltznetworks.com>2018-05-14 16:08:59 -0700
commit1c16d4a905bc1a2e0b5625a9267b95caee8ae644 (patch)
treebc6c1cd81d65e203d1d76c4f8fc63ba82cc7f695
parent96a56b82e641aced6fbaea893066f87fc3a29bbf (diff)
qtdemux: do not update segment.stop is it is not a valid timeqtdemux
Otherwise it overflows and starts having a meaningful and wrong value.
-rw-r--r--gst/isomp4/qtdemux.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index b06060d38..391b5d97b 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -4878,8 +4878,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;