diff --git a/mpd/base/xml/xml_node.cc b/mpd/base/xml/xml_node.cc index cfbc347198..dc07d2fff5 100644 --- a/mpd/base/xml/xml_node.cc +++ b/mpd/base/xml/xml_node.cc @@ -339,6 +339,14 @@ bool RepresentationXmlNode::AddAudioInfo( } bool RepresentationXmlNode::AddVODOnlyInfo(const MediaInfo& media_info) { + if (media_info.has_media_file_name()) { + XmlNode base_url("BaseURL"); + base_url.SetContent(media_info.media_file_name()); + + if (!AddChild(base_url.PassScopedPtr())) + return false; + } + const bool need_segment_base = media_info.has_index_range() || media_info.has_init_range() || media_info.has_reference_time_scale(); @@ -368,14 +376,6 @@ bool RepresentationXmlNode::AddVODOnlyInfo(const MediaInfo& media_info) { return false; } - if (media_info.has_media_file_name()) { - XmlNode base_url("BaseURL"); - base_url.SetContent(media_info.media_file_name()); - - if (!AddChild(base_url.PassScopedPtr())) - return false; - } - if (media_info.has_media_duration_seconds()) { // Adding 'duration' attribute, so that this information can be used when // generating one MPD file. This should be removed from the final MPD.