gst-device-monitor: Use g_printerr instead of g_error
authorNirbheek Chauhan <nirbheek@centricular.com>
Wed, 6 Jan 2016 04:42:43 +0000 (10:12 +0530)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 14 Jan 2016 17:51:13 +0000 (17:51 +0000)
g_error is meant to be used for programmer errors (causes an abort),
not for expected runtime errors.

tools/gst-device-monitor.c

index 83ff8f0..c0a8ec1 100644 (file)
@@ -231,8 +231,10 @@ main (int argc, char **argv)
 
   timer = g_timer_new ();
 
-  if (!gst_device_monitor_start (app.monitor))
-    g_error ("Failed to start device monitor!");
+  if (!gst_device_monitor_start (app.monitor)) {
+    g_printerr ("Failed to start device monitor!\n");
+    return -1;
+  }
 
   GST_INFO ("Took %.2f seconds", g_timer_elapsed (timer, NULL));