vaapisink: ensures raw caps at start()

Calls gst_vaapi_plugin_base_get_allowed_raw_caps() at start() to avoid
race conditions at get_caps(), especially with multiple src elements.

https://bugzilla.gnome.org/show_bug.cgi?id=776303
This commit is contained in:
Hyunjun Ko 2016-12-21 17:50:41 +09:00 committed by Víctor Manuel Jáquez Leal
parent dde4db3b3e
commit 5e09f57dea

View file

@ -1214,7 +1214,18 @@ gst_vaapisink_display_changed (GstVaapiPluginBase * plugin)
static gboolean
gst_vaapisink_start (GstBaseSink * base_sink)
{
return gst_vaapisink_ensure_display (GST_VAAPISINK_CAST (base_sink));
GstVaapiSink *const sink = GST_VAAPISINK_CAST (base_sink);
GstVaapiPluginBase *const plugin = GST_VAAPI_PLUGIN_BASE (base_sink);
if (!gst_vaapisink_ensure_display (sink))
return FALSE;
/* Ensures possible raw caps earlier to avoid race conditions at
* get_caps() */
if (!gst_vaapi_plugin_base_get_allowed_raw_caps (plugin))
return FALSE;
return TRUE;
}
static gboolean