Skip to content
Snippets Groups Projects
Commit 83bcd8fb authored by Adrien Béraud's avatar Adrien Béraud
Browse files

sipvoiplink: fix keyframe request lock

Change-Id: I514943409a319b3d7749d05e6a3ff41c4f598c24
parent 5c5f9ed5
Branches
No related tags found
No related merge requests found
...@@ -747,10 +747,10 @@ SIPVoIPLink::enqueueKeyframeRequest(const std::string &id) ...@@ -747,10 +747,10 @@ SIPVoIPLink::enqueueKeyframeRequest(const std::string &id)
void void
SIPVoIPLink::dequeKeyframeRequests() SIPVoIPLink::dequeKeyframeRequests()
{ {
std::lock_guard<std::mutex> lock(keyframeRequestsMutex_);
int max_requests = 20; int max_requests = 20;
while (not keyframeRequests_.empty() and max_requests--) { while (not keyframeRequests_.empty() and max_requests--) {
std::lock_guard<std::mutex> lock(keyframeRequestsMutex_);
const std::string &id(keyframeRequests_.front()); const std::string &id(keyframeRequests_.front());
requestKeyframe(id); requestKeyframe(id);
keyframeRequests_.pop(); keyframeRequests_.pop();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment