Migrate modules/video_coding to webrtc::Mutex.
Bug: webrtc:11567 Change-Id: I8023fbe7595f7ba8ae7c7db3583fc2e560ec3df2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178803 Commit-Queue: Markus Handell <handellm@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31644}
This commit is contained in:

committed by
Commit Bot

parent
fb6f975401
commit
6deec38ede
@ -180,7 +180,7 @@ int MultiplexEncoderAdapter::Encode(
|
||||
}
|
||||
|
||||
{
|
||||
rtc::CritScope cs(&crit_);
|
||||
MutexLock lock(&mutex_);
|
||||
stashed_images_.emplace(
|
||||
std::piecewise_construct,
|
||||
std::forward_as_tuple(input_image.timestamp()),
|
||||
@ -273,7 +273,7 @@ int MultiplexEncoderAdapter::Release() {
|
||||
}
|
||||
encoders_.clear();
|
||||
adapter_callbacks_.clear();
|
||||
rtc::CritScope cs(&crit_);
|
||||
MutexLock lock(&mutex_);
|
||||
stashed_images_.clear();
|
||||
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
@ -298,7 +298,7 @@ EncodedImageCallback::Result MultiplexEncoderAdapter::OnEncodedImage(
|
||||
// If we don't already own the buffer, make a copy.
|
||||
image_component.encoded_image.Retain();
|
||||
|
||||
rtc::CritScope cs(&crit_);
|
||||
MutexLock lock(&mutex_);
|
||||
const auto& stashed_image_itr =
|
||||
stashed_images_.find(encodedImage.Timestamp());
|
||||
const auto& stashed_image_next_itr = std::next(stashed_image_itr, 1);
|
||||
|
Reference in New Issue
Block a user