qtdemux: Use the correct duration when comparing segments
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>
Wed, 17 Feb 2010 19:27:33 +0000 (16:27 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>
Thu, 18 Feb 2010 10:53:34 +0000 (07:53 -0300)
Do not confuse QtDemuxSegments with GstSegments when
comparing the total file duration with the segment duration

Fixes #610296

gst/qtdemux/qtdemux.c

index 4870937..92a0fd0 100644 (file)
@@ -2097,9 +2097,10 @@ gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream,
   }
 
   /* segment lies beyond total indicated duration */
-  if (G_UNLIKELY (segment->duration != -1 && segment->time > segment->duration)) {
-    GST_WARNING_OBJECT (qtdemux, "segment->duration %" G_GUINT64_FORMAT
-        " < segment->time %" G_GUINT64_FORMAT, segment->duration,
+  if (G_UNLIKELY (qtdemux->segment.duration != -1 &&
+          segment->time > qtdemux->segment.duration)) {
+    GST_WARNING_OBJECT (qtdemux, "file duration %" G_GINT64_FORMAT
+        " < segment->time %" G_GUINT64_FORMAT, qtdemux->segment.duration,
         segment->time);
     return FALSE;
   }