Index: content/common/gpu/media/vaapi_video_decode_accelerator.cc |
diff --git a/content/common/gpu/media/vaapi_video_decode_accelerator.cc b/content/common/gpu/media/vaapi_video_decode_accelerator.cc |
index 50a6a6719a58dcda267b7deb6d0376a463ae71d0..6b8e8791d9b709c65fa9f2015fb3f5a7b78be020 100644 |
--- a/content/common/gpu/media/vaapi_video_decode_accelerator.cc |
+++ b/content/common/gpu/media/vaapi_video_decode_accelerator.cc |
@@ -715,11 +715,11 @@ void VaapiVideoDecodeAccelerator::FinishReset() { |
void VaapiVideoDecodeAccelerator::Cleanup() { |
DCHECK_EQ(message_loop_, base::MessageLoop::current()); |
+ base::AutoLock auto_lock(lock_); |
if (state_ == kUninitialized || state_ == kDestroying) |
return; |
DVLOG(1) << "Destroying VAVDA"; |
- base::AutoLock auto_lock(lock_); |
state_ = kDestroying; |
client_ptr_factory_.reset(); |