diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc index 129ce332..73a3bfd1 100644 --- a/media/gpu/vaapi/vaapi_wrapper.cc +++ b/media/gpu/vaapi/vaapi_wrapper.cc @@ -3028,27 +3028,12 @@ bool VaapiWrapper::CreateSurfaces( va_surfaces->resize(num_surfaces); - VASurfaceAttrib attribute{}; + VASurfaceAttrib attribute; memset(&attribute, 0, sizeof(attribute)); - if (GetImplementationType() != VAImplementation::kNVIDIAVDPAU) { - // Nvidia's VAAPI-VDPAU driver doesn't support this attribute - attribute.type = VASurfaceAttribUsageHint; - attribute.flags = VA_SURFACE_ATTRIB_SETTABLE; - attribute.value.type = VAGenericValueTypeInteger; - switch (usage_hint) { - case SurfaceUsageHint::kVideoDecoder: - attribute.value.value.i = VA_SURFACE_ATTRIB_USAGE_HINT_DECODER; - break; - case SurfaceUsageHint::kVideoEncoder: - attribute.value.value.i = VA_SURFACE_ATTRIB_USAGE_HINT_ENCODER; - break; - case SurfaceUsageHint::kVideoProcessWrite: - attribute.value.value.i = VA_SURFACE_ATTRIB_USAGE_HINT_VPP_WRITE; - break; - case SurfaceUsageHint::kGeneric: - attribute.value.value.i = VA_SURFACE_ATTRIB_USAGE_HINT_GENERIC; - break; - } + attribute.type = VASurfaceAttribUsageHint; + attribute.flags = VA_SURFACE_ATTRIB_SETTABLE; + attribute.value.type = VAGenericValueTypeInteger; + attribute.value.value.i = 0; for (SurfaceUsageHint usage_hint : usage_hints) attribute.value.value.i |= static_cast(usage_hint); static_assert(std::is_same::value,