Caps query can happen before the element has a bus. The display creation should
be should occur on the context negotiation, when the bus is already configured.
Then at caps query no display should be created.
Instead of force the display creation, we graciously fail the allowed_caps()
creation.
This change only applies for vaapidecode and vaapisink. The vaapipostroc, as a
basetransform descendant, seems to be not affected by this, nor the encoders.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
if (decode->allowed_caps)
return TRUE;
- if (!gst_vaapidecode_ensure_display (decode))
+ if (!GST_VAAPI_PLUGIN_BASE_DISPLAY (decode))
goto error_no_display;
profiles =
/* ERRORS */
error_no_display:
{
- GST_ERROR ("failed to retrieve VA display");
+ GST_INFO_OBJECT (decode, "no VA display shared yet");
return FALSE;
}
error_no_profiles:
if (!out_caps)
return NULL;
- if (gst_vaapisink_ensure_display (sink)) {
+ if (GST_VAAPI_PLUGIN_BASE_DISPLAY (sink)) {
raw_caps = gst_vaapi_plugin_base_get_allowed_raw_caps (GST_VAAPI_PLUGIN_BASE (sink));
if (raw_caps) {
out_caps = gst_caps_make_writable (out_caps);