Skip to content

Commit

Permalink
[XB1] Add d3d_device_ and device_manager_ checks. (youtube#1894)
Browse files Browse the repository at this point in the history
b/284361284
  • Loading branch information
alexanderbobrovnik authored Nov 6, 2023
1 parent 8eea4c9 commit ba528f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion starboard/shared/win32/dx_context_video_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ HardwareDecoderContext GetDirectXForHardwareDecoding() {
query_display(display, EGL_DEVICE_EXT, &egl_device);
SB_DCHECK(egl_device != 0);

intptr_t device;
intptr_t device = 0;
query_device(reinterpret_cast<EGLDeviceEXT>(egl_device),
EGL_D3D11_DEVICE_ANGLE, &device);

Expand Down
4 changes: 4 additions & 0 deletions starboard/shared/win32/video_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ VideoDecoder::VideoDecoder(
HardwareDecoderContext hardware_context = GetDirectXForHardwareDecoding();
d3d_device_ = hardware_context.dx_device_out;
device_manager_ = hardware_context.dxgi_device_manager_out;
if (!d3d_device_ || !device_manager_) {
return;
}

HRESULT hr = d3d_device_.As(&video_device_);
if (FAILED(hr)) {
return;
Expand Down

0 comments on commit ba528f4

Please sign in to comment.