gst: ensure GStreamer initialization debug message is displayed
authorLuis de Bethencourt <luis.bg@samsung.com>
Sun, 2 Nov 2014 18:51:08 +0000 (18:51 +0000)
committerLuis de Bethencourt <luis.bg@samsung.com>
Sun, 2 Nov 2014 18:51:08 +0000 (18:51 +0000)
The GST_INFO ("initialized GStreamer succesfully") is currently at the end of
gst_init_check which isn't guaranteed to be run since GStreamer can be
initialized by using init_pre and init_post directly from GOptionContext like
gst-launch does. Ensure this message is displayed by moving it to init_post.

gst/gst.c

index 562a676..cd91242 100644 (file)
--- a/gst/gst.c
+++ b/gst/gst.c
@@ -348,12 +348,6 @@ gst_init_check (int *argc, char **argv[], GError ** err)
 
   gst_initialized = res;
 
-  if (res) {
-    GST_INFO ("initialized GStreamer successfully");
-  } else {
-    GST_INFO ("failed to initialize GStreamer");
-  }
-
   g_mutex_unlock (&init_lock);
 
   return res;
@@ -715,6 +709,7 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data,
       glib_minor_version, glib_micro_version);
   GST_INFO ("GLib headers version: %d.%d.%d", GLIB_MAJOR_VERSION,
       GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
+  GST_INFO ("initialized GStreamer successfully");
 
   return TRUE;
 }