display: fix has_image_format() to check against subpicture formats.

This commit is contained in:
Gwenole Beauchesne 2011-12-12 13:39:20 +01:00
parent b4ca838fb0
commit 697b96c30c

View file

@ -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(GST_VAAPI_IS_DISPLAY(display), FALSE);
g_return_val_if_fail(format, 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);
} }
/** /**