matroskademux: mind (un)signed in some timestamp arithmetic

... to avoid ending up with invalid (negative) duration.
This commit is contained in:
Mark Nauwelaerts 2011-12-12 15:15:46 +01:00
parent ed3f89fad5
commit 581ca6ce4e

View file

@ -3485,8 +3485,8 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
GST_OBJECT_LOCK (demux);
if (demux->common.segment.duration == -1 ||
demux->common.segment.duration <
lace_time - demux->stream_start_time) {
demux->stream_start_time + demux->common.segment.duration <
last_stop_end) {
gst_segment_set_duration (&demux->common.segment, GST_FORMAT_TIME,
last_stop_end - demux->stream_start_time);
GST_OBJECT_UNLOCK (demux);