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
/* 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;