Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Unified Diff: content/common/gpu/media/vaapi_video_decode_accelerator.cc

Issue 10943003: Fix deadlock in VAAPI video decoder error cases. (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: use PostTask for Cleanup() Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698