Fix for HLS streams with "m3u" in the stream name

This commit is contained in:
Thulinma 2018-05-08 16:52:23 +02:00
parent 9ce7c29813
commit ebb9b3d8c4

View file

@ -463,7 +463,7 @@ namespace Mist {
myConn.SendNow(H.BuildResponse("404", "URL mismatch"));
H.Clean(); //clean for any possible next requests
return;
}else if (H.url.find(".m3u") == std::string::npos) {
}else if (HTTP::URL(H.url).getExt().substr(0, 3) != "m3u") {
std::string tmpStr = H.getUrl().substr(5 + streamName.size());
long long unsigned int from;
if (sscanf(tmpStr.c_str(), "/%u_%u/%llu_%llu.ts", &vidTrack, &audTrack, &from, &until) != 4) {