gst-launch: Fix process return value on error
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Fri, 4 Dec 2015 15:22:56 +0000 (10:22 -0500)
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Fri, 4 Dec 2015 15:45:44 +0000 (10:45 -0500)
In case of a run-time error message, the process return value was left
unset. This would lead to error not being caught at shell level.

https://bugzilla.gnome.org/show_bug.cgi?id=759019

tools/gst-launch.c

index a522a5b..859f9db 100644 (file)
@@ -1113,6 +1113,7 @@ main (int argc, char *argv[])
 
       tfthen = gst_util_get_timestamp ();
       caught_error = event_loop (pipeline, TRUE, FALSE, GST_STATE_PLAYING);
+      res = caught_error;
       if (eos_on_shutdown && caught_error != ELR_NO_ERROR) {
         gboolean ignore_errors;