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
This commit is contained in:
Chris Bass 2013-08-08 11:19:00 +01:00 committed by Thiago Santos
parent 19a45554bf
commit 7f21226956

View file

@ -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;