diff --git a/src/Http/HlsPlayer.cpp b/src/Http/HlsPlayer.cpp index 305b5f43..946cb29e 100644 --- a/src/Http/HlsPlayer.cpp +++ b/src/Http/HlsPlayer.cpp @@ -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(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();