dahsdemux: an incorrect index segment is downloaded
Submitted by Florin Apostol
Link to original bug (#752718)
Description
The gst_adaptive_demux_stream_download_header_fragment function is currently downloading the index segment. The stream->fragment.index_uri was set by the gst_dash_demux_stream_update_headers_info based on information supplied by gst_mpd_client_get_next_header_index function. But this function is setting the uri to initializationURL
*uri =
g_strdup (gst_mpdparser_get_initializationURL (stream,
stream->cur_segment_base->Initialization));
According to the standard, the description of indexRange@segmentBase is: "specifies the byte range that contains the Segment Index in all Media Segments of the Representation."
So the url it refers to should be the mediaURL, not the initializationURL. But the mediaURL can differ for each media segment, so the approach to download a single index segment in gst_adaptive_demux_stream_download_header_fragment is wrong.
See also https://bugzilla.gnome.org/show_bug.cgi?id=752714 for proposed changes in handling segment index downloading.