Must initialize stop_
This commit is contained in:
parent
e51fe9eb4a
commit
456afac0ec
|
@ -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<std::mutex> lck(mutex_);
|
||||
if (m_nalQueue.empty()) {
|
||||
|
|
Loading…
Reference in New Issue