Fixed streams being able to go inactive multiple times in a row
This commit is contained in:
parent
194a717ad6
commit
f695e23ffc
1 changed files with 5 additions and 2 deletions
|
@ -322,14 +322,17 @@ void Controller::SharedMemStats(void * config){
|
|||
if (activeStreams.size()){
|
||||
for (std::map<std::string, uint8_t>::iterator it = activeStreams.begin(); it != activeStreams.end(); ++it){
|
||||
uint8_t newState = Util::getStreamStatus(it->first);
|
||||
if (newState != activeStreams[it->first]){
|
||||
uint8_t oldState = activeStreams[it->first];
|
||||
if (newState != oldState){
|
||||
activeStreams[it->first] = newState;
|
||||
if (newState == STRMSTAT_READY){
|
||||
streamStarted(it->first);
|
||||
}else{
|
||||
if (oldState == STRMSTAT_READY){
|
||||
streamStopped(it->first);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (newState == STRMSTAT_OFF){
|
||||
inactiveStreams.insert(it->first);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue