diff options
author | imcheng@chromium.org <imcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-30 18:15:06 +0000 |
---|---|---|
committer | imcheng@chromium.org <imcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-30 18:15:06 +0000 |
commit | 6354faca1d6b25d3e2ade0793bf4505284c0182c (patch) | |
tree | 2eaa9e089d96c809d04871ab11c1a58606837f93 /media/tools | |
parent | 086b96356d78fea55ad2ebffa1f5b21ea68eaad8 (diff) | |
download | chromium_src-6354faca1d6b25d3e2ade0793bf4505284c0182c.zip chromium_src-6354faca1d6b25d3e2ade0793bf4505284c0182c.tar.gz chromium_src-6354faca1d6b25d3e2ade0793bf4505284c0182c.tar.bz2 |
Second attempt at fixing the Direct3D Present() crash. It is fixed by realizing that the Direct3D device is shared by multiple decoder threads and the "renderer" thread and so the D3DCREATE_MULTITHREADED flag must be specified when it is created.
BUG=49364
TEST=try mfdecoder with -h -r flags set. (render using Present() as fast as possible) Tried it on my laptop where it used to crash most of the time -- now with the fix, the program no longer crashes.
Review URL: http://codereview.chromium.org/3218007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57884 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/tools')
-rw-r--r-- | media/tools/mfdecoder/main.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/media/tools/mfdecoder/main.cc b/media/tools/mfdecoder/main.cc index 42d8d51..1ede4af 100644 --- a/media/tools/mfdecoder/main.cc +++ b/media/tools/mfdecoder/main.cc @@ -336,8 +336,9 @@ IDirect3DDeviceManager9* CreateD3DDevManager(HWND video_window, // D3DCREATE_HARDWARE_VERTEXPROCESSING specifies hardware vertex processing. HRESULT hr = d3d->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, - NULL, - D3DCREATE_HARDWARE_VERTEXPROCESSING, + video_window, + (D3DCREATE_HARDWARE_VERTEXPROCESSING | + D3DCREATE_MULTITHREADED), &present_params, temp_device.Receive()); if (FAILED(hr)) { |