BalderDash fixes (H264 mp4 codecs weirdness//FF)

This commit is contained in:
Balder 2016-02-29 11:35:17 +01:00
parent b79fb8cd6b
commit 7710a7d8a7

View file

@ -349,9 +349,9 @@ namespace Mist {
std::stringstream r; std::stringstream r;
MP4::AVCC avccBox; MP4::AVCC avccBox;
avccBox.setPayload(initData); avccBox.setPayload(initData);
r << std::hex << std::setw(2) << std::setfill('0') << (int)avccBox.getSPS()[0] << std::dec; r << std::hex << std::setw(2) << std::setfill('0') << (int)initData[1] << std::dec;
r << std::hex << std::setw(2) << std::setfill('0') << (int)avccBox.getSPS()[1] << std::dec; r << std::hex << std::setw(2) << std::setfill('0') << (int)initData[2] << std::dec;
r << std::hex << std::setw(2) << std::setfill('0') << (int)avccBox.getSPS()[2] << std::dec; r << std::hex << std::setw(2) << std::setfill('0') << (int)initData[3] << std::dec;
return r.str(); return r.str();
} }
@ -545,7 +545,7 @@ namespace Mist {
std::string url = H.url; std::string url = H.url;
if (url.find(".mpd") != std::string::npos){ if (url.find(".mpd") != std::string::npos){
H.Clean(); H.Clean();
H.SetHeader("Content-Type", "application/xml"); H.SetHeader("Content-Type", "application/dash+xml");
H.SetHeader("Cache-Control", "no-cache"); H.SetHeader("Cache-Control", "no-cache");
H.setCORSHeaders(); H.setCORSHeaders();
if(method == "OPTIONS" || method == "HEAD"){ if(method == "OPTIONS" || method == "HEAD"){