Since we loop in here, need to lock the packetqueue
This commit is contained in:
parent
bbba0f679b
commit
be893fe9e4
|
@ -479,6 +479,7 @@ bool zm_packetqueue::increment_it(packetqueue_iterator *it, int stream_id) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::unique_lock<std::mutex> lck(mutex);
|
||||||
do {
|
do {
|
||||||
++(*it);
|
++(*it);
|
||||||
} while ( (*it != pktQueue.end()) and ( (*(*it))->packet.stream_index != stream_id) );
|
} while ( (*it != pktQueue.end()) and ( (*(*it))->packet.stream_index != stream_id) );
|
||||||
|
|
Loading…
Reference in New Issue