mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-10 01:54:11 +00:00
vaapi: don't register if VA driver is unsupported
Using the test VA display, the driver name is queried, and if it is not white-listed, the plugin rejects to register any element. https://bugzilla.gnome.org/show_bug.cgi?id=724352
This commit is contained in:
parent
a9e7eac108
commit
90b0ba7e2b
1 changed files with 7 additions and 0 deletions
|
@ -88,6 +88,8 @@ plugin_init (GstPlugin * plugin)
|
|||
display = gst_vaapi_create_test_display ();
|
||||
if (!display)
|
||||
goto error_no_display;
|
||||
if (!gst_vaapi_driver_is_whitelisted (display))
|
||||
goto unsupported_driver;
|
||||
|
||||
gst_vaapidecode_register (plugin);
|
||||
|
||||
|
@ -133,6 +135,11 @@ error_no_display:
|
|||
* transient condition */
|
||||
return TRUE;
|
||||
}
|
||||
unsupported_driver:
|
||||
{
|
||||
gst_vaapi_display_unref (display);
|
||||
return TRUE; /* return TRUE to avoid get blacklisted */
|
||||
}
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR,
|
||||
|
|
Loading…
Reference in a new issue