mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-07 07:55:41 +00:00
wpe: avoid crash with G_DEBUG=fatal_criticals and static build
No plugin filenames if static build. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6488>
This commit is contained in:
parent
1dc3fe831c
commit
ca97570da5
1 changed files with 7 additions and 3 deletions
|
@ -42,14 +42,18 @@ static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
gboolean result;
|
gboolean result;
|
||||||
gchar *dirname = g_path_get_dirname (gst_plugin_get_filename (plugin));
|
gchar *dirname;
|
||||||
|
const gchar *filename = gst_plugin_get_filename (plugin);
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_INIT (wpe_video_src_debug, "wpevideosrc", 0, "WPE Video Source");
|
GST_DEBUG_CATEGORY_INIT (wpe_video_src_debug, "wpevideosrc", 0, "WPE Video Source");
|
||||||
GST_DEBUG_CATEGORY_INIT (wpe_view_debug, "wpeview", 0, "WPE Threaded View");
|
GST_DEBUG_CATEGORY_INIT (wpe_view_debug, "wpeview", 0, "WPE Threaded View");
|
||||||
GST_DEBUG_CATEGORY_INIT (wpe_src_debug, "wpesrc", 0, "WPE Source");
|
GST_DEBUG_CATEGORY_INIT (wpe_src_debug, "wpesrc", 0, "WPE Source");
|
||||||
|
|
||||||
extension_path = g_build_filename (dirname, "wpe-extension", NULL);
|
if (filename != NULL) {
|
||||||
g_free (dirname);
|
dirname = g_path_get_dirname (filename);
|
||||||
|
extension_path = g_build_filename (dirname, "wpe-extension", NULL);
|
||||||
|
g_free (dirname);
|
||||||
|
}
|
||||||
result = gst_element_register (plugin, "wpevideosrc", GST_RANK_NONE,
|
result = gst_element_register (plugin, "wpevideosrc", GST_RANK_NONE,
|
||||||
GST_TYPE_WPE_VIDEO_SRC);
|
GST_TYPE_WPE_VIDEO_SRC);
|
||||||
result &= gst_element_register(plugin, "wpesrc", GST_RANK_NONE, GST_TYPE_WPE_SRC);
|
result &= gst_element_register(plugin, "wpesrc", GST_RANK_NONE, GST_TYPE_WPE_SRC);
|
||||||
|
|
Loading…
Reference in a new issue