Commit 896fac40 authored by jyasskin's avatar jyasskin Committed by Commit bot

Consistently lock RTCVideoDecoder::state_.

RTCVideoDecoder::ResetInternal() forgot to lock it, which caused TSan
errors in the unittest.

Review-Url: https://codereview.chromium.org/2339043002
Cr-Commit-Position: refs/heads/master@{#418669}
parent ac59f3fd
...@@ -672,8 +672,10 @@ void RTCVideoDecoder::ResetInternal() { ...@@ -672,8 +672,10 @@ void RTCVideoDecoder::ResetInternal() {
vda_->Reset(); vda_->Reset();
} else { } else {
CreateVDA(vda_codec_profile_, nullptr); CreateVDA(vda_codec_profile_, nullptr);
if (vda_) if (vda_) {
base::AutoLock auto_lock(lock_);
state_ = INITIALIZED; state_ = INITIALIZED;
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment