plugins: set display through context
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Fri, 30 Oct 2015 11:33:48 +0000 (12:33 +0100)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Mon, 9 Nov 2015 15:18:19 +0000 (16:18 +0100)
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

gst/vaapi/gstvaapipluginutil.c
gst/vaapi/gstvaapivideocontext.c

index 2071adc..f5d3fe6 100644 (file)
@@ -250,7 +250,6 @@ gst_vaapi_ensure_display (GstElement * element, GstVaapiDisplayType type)
     return FALSE;
 
   gst_vaapi_video_context_propagate (element, display);
-  GST_VAAPI_PLUGIN_BASE_DISPLAY_REPLACE (plugin, display);
   gst_vaapi_display_unref (display);
   return TRUE;
 }
index 36737a0..62bd9d4 100644 (file)
@@ -205,6 +205,7 @@ gst_vaapi_video_context_propagate (GstElement * element,
   GstMessage *msg;
 
   context = gst_vaapi_video_context_new_with_display (display, FALSE);
+  gst_element_set_context (element, context);
 
   _init_context_debug ();
   GST_CAT_INFO_OBJECT (GST_CAT_CONTEXT, element,