Handle zmTerminate in ReadRun. Fixes crash on termination of zm_rtsp_server
parent
f41c5994be
commit
5fea76ee07
|
@ -51,8 +51,9 @@ ZoneMinderFifoSource::~ZoneMinderFifoSource() {
|
|||
// thread mainloop
|
||||
void ZoneMinderFifoSource::ReadRun() {
|
||||
if (stop_) Warning("bad value for stop_ in ReadRun");
|
||||
while (!stop_) {
|
||||
while (!stop_ and !zm_terminate) {
|
||||
if (getNextFrame() < 0) {
|
||||
if (!stop_ and !zm_terminate) return;
|
||||
Debug(1, "Sleeping because couldn't getNextFrame");
|
||||
sleep(1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue