plugins: fix initialization with foreign context.

When a new display is settled through GstElement::set_context() (>= 1.2),
or GstVideoContext::set_context() (<= 1.0), then we shall also update the
associated display type.
This commit is contained in:
Gwenole Beauchesne 2014-03-07 17:38:14 +01:00
parent 3af6b0b8a0
commit eef863f82f

View file

@ -65,6 +65,7 @@ plugin_set_context (GstElement * element, GstContext * context)
GST_INFO_OBJECT (element, "set display %p", display); GST_INFO_OBJECT (element, "set display %p", display);
gst_vaapi_display_replace (&plugin->display, display); gst_vaapi_display_replace (&plugin->display, display);
gst_vaapi_display_unref (display); gst_vaapi_display_unref (display);
plugin->display_type = gst_vaapi_display_get_display_type (display);
} }
} }
#else #else
@ -75,6 +76,7 @@ plugin_set_context (GstVideoContext * context, const gchar * type,
GstVaapiPluginBase *const plugin = GST_VAAPI_PLUGIN_BASE (context); GstVaapiPluginBase *const plugin = GST_VAAPI_PLUGIN_BASE (context);
gst_vaapi_set_display (type, value, &plugin->display); gst_vaapi_set_display (type, value, &plugin->display);
plugin->display_type = gst_vaapi_display_get_display_type (plugin->display);
} }
static void static void