context: fix get_attribute() value result.

Unknown attributes, or attributes that are not supported for the given
profile/entrypoint pair have a return value of VA_ATTRIB_NOT_SUPPORTED.
So, return failure in this case.
This commit is contained in:
Gwenole Beauchesne 2014-01-23 11:44:12 +01:00
parent 3b714c8913
commit e3ed05bc52

View file

@ -425,6 +425,8 @@ gst_vaapi_context_get_attribute (GstVaapiContext * context,
GST_VAAPI_OBJECT_UNLOCK_DISPLAY (context);
if (!vaapi_check_status (status, "vaGetConfigAttributes()"))
return FALSE;
if (attrib.value == VA_ATTRIB_NOT_SUPPORTED)
return FALSE;
if (out_value_ptr)
*out_value_ptr = attrib.value;