From 84b5fc5e5874c4c2e97f07dd1260f29a94bbf7de Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Mon, 2 Apr 2012 14:51:06 +0200 Subject: [PATCH] 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. --- NEWS | 1 + gst/vaapi/gstvaapidecode.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index a3f4ee6f5c..f3ac4ebbfa 100644 --- a/NEWS +++ b/NEWS @@ -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) diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index 5035fcd164..6e73d3a505 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -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: {