vaapidecode: report unsupported codec profiles.

Try to gracefully abort when the HW does not support the requested
profile. There is no fallback unless profiles are correctly parsed
and matched through caps beforehand.
This commit is contained in:
Gwenole Beauchesne 2012-04-02 14:51:06 +02:00
parent bd08610e07
commit 84b5fc5e58
2 changed files with 12 additions and 1 deletions

1
NEWS
View file

@ -4,6 +4,7 @@ Copyright (C) 2011-2012 Intel Corporation
Copyright (C) 2011 Collabora
Version 0.3.7 - DD.Apr.2012
* Fix vaapidecode to report unsupported codec profiles
* Don't forcibly resize user provided X windows (Holger Kaelberer)
* Recalculate render rect only if caps are negotiated (Holger Kaelberer)

View file

@ -269,7 +269,17 @@ error_decode_timeout:
error_decode:
{
GST_DEBUG("decode error %d", status);
return GST_FLOW_UNEXPECTED;
switch (status) {
case GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_CODEC:
case GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_PROFILE:
case GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_CHROMA_FORMAT:
ret = GST_FLOW_NOT_SUPPORTED;
break;
default:
ret = GST_FLOW_UNEXPECTED;
break;
}
return ret;
}
error_create_buffer:
{