summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Bass <floobleflam@gmail.com>2013-08-08 11:19:00 +0100
committerThiago Santos <thiago.sousa.santos@collabora.com>2013-08-16 11:15:47 -0300
commit7f2122695662dcf64e5e2980eab93f5816a2c4b1 (patch)
tree7386dca90b329182d04bb263060bd4f991b97d68
parent19a45554bf3265018bed3f925baa0c404706a62b (diff)
downloadgstreamer-plugins-bad-7f2122695662dcf64e5e2980eab93f5816a2c4b1.tar.gz
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
-rw-r--r--ext/dash/gstmpdparser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c
index 8bd890728..071f4f5a4 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;