[0.11] gst-plugins-good: matroskademux: mind (un) signed in some timestamp arithmetic

Sebastian Dröge slomo at kemper.freedesktop.org
Tue Jan 10 05:33:02 PST 2012


Module: gst-plugins-good
Branch: 0.11
Commit: 581ca6ce4eb5fd878879d85a660ead21438eeed8
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=581ca6ce4eb5fd878879d85a660ead21438eeed8

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Mon Dec 12 15:15:46 2011 +0100

matroskademux: mind (un)signed in some timestamp arithmetic

... to avoid ending up with invalid (negative) duration.

---

 gst/matroska/matroska-demux.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index eac7d65..8247d76 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -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);



More information about the gstreamer-commits mailing list