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 45f7f2b8db9f098fc1fbdbca76a80cdc2f9ab864..fdca97a3476b1752600cbaa4df1fe63a98482964 100644 |
--- a/content/common/gpu/media/vaapi_video_decode_accelerator.cc |
+++ b/content/common/gpu/media/vaapi_video_decode_accelerator.cc |
@@ -43,13 +43,15 @@ void VaapiVideoDecodeAccelerator::NotifyError(Error error) { |
return; |
} |
- DVLOG(1) << "Notifying of error " << error; |
+ // Post Cleanup() as a task so we don't recursively acquire lock_. |
+ message_loop_->PostTask(FROM_HERE, base::Bind( |
+ &VaapiVideoDecodeAccelerator::Cleanup, weak_this_)); |
+ DVLOG(1) << "Notifying of error " << error; |
if (client_) { |
client_->NotifyError(error); |
client_ptr_factory_.InvalidateWeakPtrs(); |
} |
- Cleanup(); |
} |
VaapiVideoDecodeAccelerator::VaapiVideoDecodeAccelerator( |