Fixes hls crash on non-existing streams
This commit is contained in:
parent
90c017bfcd
commit
c1373fba17
2 changed files with 9 additions and 4 deletions
|
@ -75,9 +75,6 @@ namespace Mist {
|
|||
virtual void onFail();
|
||||
virtual void requestHandler();
|
||||
private://these *should* not be messed with in child classes.
|
||||
inline bool keepGoing(){
|
||||
return config->is_active && myConn;
|
||||
}
|
||||
std::map<unsigned long, unsigned int> currKeyOpen;
|
||||
void loadPageForKey(long unsigned int trackId, long long int keyNum);
|
||||
int pageNumForKey(long unsigned int trackId, long long int keyNum);
|
||||
|
@ -119,6 +116,9 @@ namespace Mist {
|
|||
void waitForStreamPushReady();
|
||||
bool pushIsOngoing;
|
||||
void bufferLivePacket(const DTSC::Packet & packet);
|
||||
inline bool keepGoing(){
|
||||
return config->is_active && myConn;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -175,6 +175,11 @@ namespace Mist {
|
|||
}
|
||||
|
||||
initialize();
|
||||
|
||||
if (!keepGoing()){
|
||||
return;
|
||||
}
|
||||
|
||||
if (H.url.find(".m3u") == std::string::npos){
|
||||
std::string tmpStr = H.getUrl().substr(5 + streamName.size());
|
||||
long long unsigned int from;
|
||||
|
|
Loading…
Add table
Reference in a new issue