plugins: set display through context

Instead of setting the display to the plugin directly after its creation, do
it through the gstreamer's context mechanism, avoiding double assignations.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=757598
This commit is contained in:
Víctor Manuel Jáquez Leal 2015-10-30 12:33:48 +01:00
parent 959c13933d
commit b45089f0f7
2 changed files with 1 additions and 1 deletions

View file

@ -250,7 +250,6 @@ gst_vaapi_ensure_display (GstElement * element, GstVaapiDisplayType type)
return FALSE; return FALSE;
gst_vaapi_video_context_propagate (element, display); gst_vaapi_video_context_propagate (element, display);
GST_VAAPI_PLUGIN_BASE_DISPLAY_REPLACE (plugin, display);
gst_vaapi_display_unref (display); gst_vaapi_display_unref (display);
return TRUE; return TRUE;
} }

View file

@ -205,6 +205,7 @@ gst_vaapi_video_context_propagate (GstElement * element,
GstMessage *msg; GstMessage *msg;
context = gst_vaapi_video_context_new_with_display (display, FALSE); context = gst_vaapi_video_context_new_with_display (display, FALSE);
gst_element_set_context (element, context);
_init_context_debug (); _init_context_debug ();
GST_CAT_INFO_OBJECT (GST_CAT_CONTEXT, element, GST_CAT_INFO_OBJECT (GST_CAT_CONTEXT, element,