http-ts拉流新增支持mime类型(#1475)

ts切片有些mime头并不是只有这两种,
比如youtube的ts切片头就是application/octet-stream
This commit is contained in:
alexliyu7352 2022-03-12 09:35:22 +08:00 committed by GitHub
parent 93261fe3ba
commit 2c63916973
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ void HttpTSPlayer::onResponseHeader(const string &status, const HttpClient::Http
}
auto content_type = strToLower(const_cast<HttpClient::HttpHeader &>(header)["Content-Type"]);
if (content_type.find("video/mp2t") != 0 && content_type.find("video/mpeg") != 0) {
if (content_type.find("video/mp2t") != 0 && content_type.find("video/mpeg") != 0 && content_type.find("application/octet-stream") != 0) {
WarnL << "may not a mpeg-ts video: " << content_type << ", url: " << getUrl();
}
}