diff --git a/src/zm_rtsp_server_fifo_source.cpp b/src/zm_rtsp_server_fifo_source.cpp index 677eb534a..82d60b72a 100644 --- a/src/zm_rtsp_server_fifo_source.cpp +++ b/src/zm_rtsp_server_fifo_source.cpp @@ -25,6 +25,7 @@ ZoneMinderFifoSource::ZoneMinderFifoSource( xop::MediaChannelId channelId, std::string fifo ) : + stop_(false), m_rtspServer(rtspServer), m_sessionId(sessionId), m_channelId(channelId), @@ -47,6 +48,7 @@ ZoneMinderFifoSource::~ZoneMinderFifoSource() { // thread mainloop void ZoneMinderFifoSource::ReadRun() { + if (!stop_) Warning("bad value for stop_ in ReadRun"); while (!stop_) { if (getNextFrame() < 0) { Debug(1, "Sleeping"); @@ -55,6 +57,7 @@ void ZoneMinderFifoSource::ReadRun() { } } void ZoneMinderFifoSource::WriteRun() { + if (!stop_) Warning("bad value for stop_ in WriteRun"); while (!stop_) { std::unique_lock lck(mutex_); if (m_nalQueue.empty()) {