hls拉流新增支持mime类型 (#1476)
一些流服务器输出mime头有可能时audio/x-mpegurl, 所以这点的判断不能写的太死了.
This commit is contained in:
parent
2c63916973
commit
b4241e12d5
|
|
@ -172,7 +172,7 @@ void HlsPlayer::onResponseHeader(const string &status, const HttpClient::HttpHea
|
|||
throw invalid_argument("bad http status code:" + status);
|
||||
}
|
||||
auto content_type = strToLower(const_cast<HttpClient::HttpHeader &>(headers)["Content-Type"]);
|
||||
if (content_type.find("application/vnd.apple.mpegurl") != 0 && content_type.find("application/x-mpegurl") != 0) {
|
||||
if (content_type.find("application/vnd.apple.mpegurl") != 0 && content_type.find("/x-mpegurl") == _StrPrinter::npos) {
|
||||
WarnL << "may not a hls video: " << content_type << ", url: " << getUrl();
|
||||
}
|
||||
_m3u8.clear();
|
||||
|
|
|
|||
Loading…
Reference in New Issue