dashdemux: fixed segment start when specified by SegmentTimeline
authorFlorin Apostol <florin.apostol@oregan.net>
Thu, 2 Jul 2015 14:17:51 +0000 (15:17 +0100)
committerThiago Santos <thiagoss@osg.samsung.com>
Sun, 5 Jul 2015 16:54:00 +0000 (13:54 -0300)
@t attribute in segment Timeline is relative to the period start.
Corrected the code to take this into account when computing segment
timestamp.

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

ext/dash/gstmpdparser.c

index 04c92c9..abaa124 100644 (file)
@@ -3229,6 +3229,7 @@ gst_mpd_client_setup_representation (GstMpdClient * client,
             start_time = S->t * GST_SECOND;
             if (timescale > 1)
               start_time /= timescale;
+            start_time += PeriodStart;
           }
 
           if (!gst_mpd_client_add_media_segment (stream, SegmentURL->data, i,
@@ -3325,6 +3326,7 @@ gst_mpd_client_setup_representation (GstMpdClient * client,
             start_time = S->t * GST_SECOND;
             if (timescale > 1)
               start_time /= timescale;
+            start_time += PeriodStart;
           }
 
           if (!gst_mpd_client_add_media_segment (stream, NULL, i, S->r, start,