Commit 67d9d45d authored by Ted Meyer's avatar Ted Meyer Committed by Commit Bot

Move use until after check

Change-Id: Idd502786dc49b4bef25ae22e86a44ef6516275c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1756436Reviewed-by: default avatarFrank Liberato <liberato@chromium.org>
Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687377}
parent a2c347b4
......@@ -224,14 +224,14 @@ void D3D11VideoDecoder::Initialize(const VideoDecoderConfig& config,
//
// TODO(liberato): On re-init, we can probably re-use the device.
device_ = get_d3d11_device_cb_.Run();
usable_feature_level_ = device_->GetFeatureLevel();
if (!device_) {
// This happens if, for example, if chrome is configured to use
// D3D9 for ANGLE.
NotifyError("ANGLE did not provide D3D11 device");
return;
}
usable_feature_level_ = device_->GetFeatureLevel();
device_->GetImmediateContext(device_context_.ReleaseAndGetAddressOf());
HRESULT hr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment