Commit 34c175bd authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

media/gpu/vaapiVEA: Fix a wrong check on a return value of CreateContextAndSurfaces

crrev.com/c/1847432 introduced the bug that VaapiWrapper is destroyed when
VaapiWrapper::CreateContextAndSurfaces is successful. This CL fixes the wrong
check on the return value.

Bug: 1009297, 1005205
Test: https://appr.tc/?debug=loopback&vsc=vp8&video=maxWidth=640,maxHeight=360,minWidth=640,minHeight=360&debug=loopback
Change-Id: I9a31b305c991cee5e28139d307f87430c20b45e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1862880Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarRicky Liang <jcliang@chromium.org>
Auto-Submit: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706287}
parent 9ddd9e80
......@@ -639,7 +639,7 @@ scoped_refptr<VaapiEncodeJob> VaapiVideoEncodeAccelerator::CreateEncodeJob(
}
// Allocate the same number of surfaces as reconstructed surfaces.
if (vpp_vaapi_wrapper_->CreateContextAndSurfaces(
if (!vpp_vaapi_wrapper_->CreateContextAndSurfaces(
kVaSurfaceFormat, aligned_input_size_,
VaapiWrapper::SurfaceUsageHint::kVideoProcessWrite,
num_frames_in_flight_ + 1, &available_vpp_va_surface_ids_)) {
......
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