diff --git a/mpd/base/mpd_builder.cc b/mpd/base/mpd_builder.cc index 5916a28f6a..292340be21 100644 --- a/mpd/base/mpd_builder.cc +++ b/mpd/base/mpd_builder.cc @@ -89,8 +89,9 @@ xmlDocPtr MpdBuilder::GenerateMpd() { "urn:mpeg:DASH:schema:MPD:2011 DASH-MPD.xsd"; mpd.SetStringAttribute("xsi:schemaLocation", kDashSchemaMpd2011); - static const char kMinBufferTimeTwoSeconds[] = "PT2S"; - mpd.SetStringAttribute("minBufferTime", kMinBufferTimeTwoSeconds); + // Currently set to 2. Does this need calculation? + const int kMinBufferTime = 2; + mpd.SetStringAttribute("minBufferTime", SecondsToXmlDuration(kMinBufferTime)); // Iterate thru AdaptationSets and add them to one big Period element. XmlNode period("Period"); diff --git a/mpd/base/mpd_utils.cc b/mpd/base/mpd_utils.cc index f6c5b3d774..deb27ad581 100644 --- a/mpd/base/mpd_utils.cc +++ b/mpd/base/mpd_utils.cc @@ -76,7 +76,7 @@ std::string GetCodecs(const MediaInfo& media_info) { } std::string SecondsToXmlDuration(uint32 seconds) { - return "P" + base::UintToString(seconds) + "S"; + return "PT" + base::UintToString(seconds) + "S"; } bool GetDurationAttribute(xmlNodePtr node, uint32* duration) {