mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 22:16:22 +00:00
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:
parent
3af6b0b8a0
commit
eef863f82f
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue