gst_init: Initialize static plugins just before dynamic plugins
authorXavier Claessens <xavier.claessens@collabora.com>
Wed, 31 Aug 2022 13:15:08 +0000 (09:15 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 31 Aug 2022 14:20:58 +0000 (14:20 +0000)
All plugins needs to be initialized after `gst_initialized = TRUE;`
otherwise they could complain that gst_init() has not been called.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2962>

subprojects/gstreamer/gst/gst.c

index ddfc178..fa1b338 100644 (file)
@@ -797,8 +797,6 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data,
       gst_register_core_elements, VERSION, GST_LICENSE, PACKAGE,
       GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
 
-  init_static_plugins ();
-
   /*
    * Any errors happening below this point are non-fatal, we therefore mark
    * gstreamer as being initialized, since it is the case from a plugin point of
@@ -806,6 +804,7 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data,
    */
   gst_initialized = TRUE;
 
+  init_static_plugins ();
   gst_update_registry ();
 
   GST_INFO ("GLib runtime version: %d.%d.%d", glib_major_version,