From 7f2122695662dcf64e5e2980eab93f5816a2c4b1 Mon Sep 17 00:00:00 2001 From: Chris Bass Date: Thu, 8 Aug 2013 11:19:00 +0100 Subject: [PATCH] dashdemux: offset segment numbers by startNumber For SegmentTemplate elements containing a startNumber attribute, the `number' member of GstMediaSegments should be offset by the value of startNumber; however, this is not currently the case. As a result, the first URI(s) requested by the download loop will be wrong. This commit ensures that segment numbers will be offset by startNumber when one is present in a SegmentTemplate element. https://bugzilla.gnome.org/show_bug.cgi?id=705661 --- ext/dash/gstmpdparser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index 8bd8907286..071f4f5a48 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -3035,7 +3035,8 @@ gst_mpdparser_get_chunk_by_index (GstMpdClient * client, guint indexStream, /* TODO check PeriodEnd for segment beyond end of period */ - segment->number = indexChunk; + segment->number = indexChunk + + stream->cur_seg_template->MultSegBaseType->startNumber; segment->start_time = duration * indexChunk; segment->duration = duration; segment->SegmentURL = NULL;