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

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

Issue 1009683002: Release the D3D9 and DX11 device object, device manager and other related interfaces before calling… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/dxva_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/dxva_video_decode_accelerator.cc b/content/common/gpu/media/dxva_video_decode_accelerator.cc
index be50634283fa0f00806b7c69f5951f6889453eba..5c1c7f4f4608232df3062ac3e981e8d8601eefac 100644
--- a/content/common/gpu/media/dxva_video_decode_accelerator.cc
+++ b/content/common/gpu/media/dxva_video_decode_accelerator.cc
@@ -1391,13 +1391,26 @@ void DXVAVideoDecodeAccelerator::Invalidate() {
pending_output_samples_.clear();
pending_input_buffers_.clear();
decoder_.Release();
- if (video_format_converter_mft_.get()) {
- video_format_converter_mft_->ProcessMessage(
- MFT_MESSAGE_NOTIFY_END_STREAMING, 0);
- video_format_converter_mft_.Release();
+
+ if (use_dx11_) {
+ if (video_format_converter_mft_.get()) {
+ video_format_converter_mft_->ProcessMessage(
+ MFT_MESSAGE_NOTIFY_END_STREAMING, 0);
+ video_format_converter_mft_.Release();
+ }
+ d3d11_device_context_.Release();
+ d3d11_device_.Release();
+ d3d11_device_manager_.Release();
+ d3d11_query_.Release();
+ dx11_video_format_converter_media_type_needs_init_ = true;
+ } else {
+ d3d9_.Release();
+ d3d9_device_ex_.Release();
+ device_manager_.Release();
+ query_.Release();
}
+
MFShutdown();
- dx11_video_format_converter_media_type_needs_init_ = true;
SetState(kUninitialized);
}
« 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