Fixed HLS url recognition failure
This commit is contained in:
parent
b1e3eb3628
commit
c7cef0260f
1 changed files with 8 additions and 1 deletions
|
@ -220,7 +220,14 @@ namespace Mist {
|
||||||
std::string tmpStr = HTTP_R.getUrl();
|
std::string tmpStr = HTTP_R.getUrl();
|
||||||
std::string fmtStr = "/hls/" + streamName + "/%u_%u/%llu_%llu.ts";
|
std::string fmtStr = "/hls/" + streamName + "/%u_%u/%llu_%llu.ts";
|
||||||
long long unsigned int from;
|
long long unsigned int from;
|
||||||
sscanf(tmpStr.c_str(), fmtStr.c_str(), &vidTrack, &audTrack, &from, &until);
|
if (sscanf(tmpStr.c_str(), fmtStr.c_str(), &vidTrack, &audTrack, &from, &until) != 4){
|
||||||
|
WARN_MSG("Could not parse URL: %s", HTTP_R.getUrl().c_str());
|
||||||
|
HTTP_S.Clean();
|
||||||
|
HTTP_S.SetBody("The HLS URL wasn't understood - what did you want, exactly?\n");
|
||||||
|
myConn.SendNow(HTTP_S.BuildResponse("404", "URL mismatch"));
|
||||||
|
HTTP_R.Clean(); //clean for any possible next requests
|
||||||
|
continue;
|
||||||
|
}
|
||||||
DEBUG_MSG(DLVL_DEVEL, "Vid %u, Aud %u, From %llu, Until %llu", vidTrack, audTrack, from, until);
|
DEBUG_MSG(DLVL_DEVEL, "Vid %u, Aud %u, From %llu, Until %llu", vidTrack, audTrack, from, until);
|
||||||
selectedTracks.clear();
|
selectedTracks.clear();
|
||||||
selectedTracks.insert(vidTrack);
|
selectedTracks.insert(vidTrack);
|
||||||
|
|
Loading…
Add table
Reference in a new issue