qtdemux: Fix parsing segment duration of empty edit list box
authorSeungha Yang <sh.yang@lge.com>
Sun, 10 Apr 2016 23:33:17 +0000 (08:33 +0900)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 11 Apr 2016 07:28:07 +0000 (10:28 +0300)
For empty edit list, segment-duration in edit list box should not be
used for segment event.

https://bugzilla.gnome.org/show_bug.cgi?id=764870

gst/isomp4/qtdemux.c

index b568c50..77d3272 100644 (file)
@@ -8326,7 +8326,7 @@ qtdemux_parse_segments (GstQTDemux * qtdemux, QtDemuxStream * stream,
       /* time and duration expressed in global timescale */
       segment->time = stime;
       /* add non scaled values so we don't cause roundoff errors */
-      if (duration) {
+      if (duration || media_start == GST_CLOCK_TIME_NONE) {
         time += duration;
         stime = QTTIME_TO_GSTTIME (qtdemux, time);
         segment->duration = stime - segment->time;