summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2011-12-12 13:39:20 +0100
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2011-12-12 15:09:37 +0100
commit697b96c30c451ce43b4cdbb90142f77faaff8f9b (patch)
tree920b2ff1c3b180addc71d54be95d940e3740d2c2
parentb4ca838fb070daaf5b01e97c7723684db1db3395 (diff)
display: fix has_image_format() to check against subpicture formats.
-rw-r--r--gst-libs/gst/vaapi/gstvaapidisplay.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay.c b/gst-libs/gst/vaapi/gstvaapidisplay.c
index ea0780d3..b4da1624 100644
--- a/gst-libs/gst/vaapi/gstvaapidisplay.c
+++ b/gst-libs/gst/vaapi/gstvaapidisplay.c
@@ -893,7 +893,14 @@ gst_vaapi_display_has_image_format(
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), FALSE);
g_return_val_if_fail(format, FALSE);
- return find_format(display->priv->image_formats, format);
+ if (find_format(display->priv->image_formats, format))
+ return TRUE;
+
+ /* XXX: try subpicture formats since some drivers could report a
+ * set of VA image formats that is not a superset of the set of VA
+ * subpicture formats
+ */
+ return find_format(display->priv->subpicture_formats, format);
}
/**