From 1bc32a888f5b3f3631f5e89fa70b6fb7f1e1bc31 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 3 Dec 2014 11:28:28 +0100 Subject: [PATCH] validate: Avoid assert removing an already removed signal handler And, make sure that we set the return value != 0 when we receive SIGINT --- validate/tools/gst-validate.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/validate/tools/gst-validate.c b/validate/tools/gst-validate.c index 589d2ccbe5..79aa1694a2 100644 --- a/validate/tools/gst-validate.c +++ b/validate/tools/gst-validate.c @@ -39,6 +39,7 @@ #include #endif +static gint ret = 0; static GMainLoop *mainloop; static GstElement *pipeline; static gboolean buffering = FALSE; @@ -56,8 +57,10 @@ intr_handler (gpointer user_data) g_main_loop_quit (mainloop); - /* remove signal handler */ - return FALSE; + ret = SIGINT; + + /* Keep signal handler, it will be removed later anyway */ + return TRUE; } #endif /* G_OS_UNIX */ @@ -372,7 +375,6 @@ main (int argc, gchar ** argv) inspect_action_type = FALSE; GstStateChangeReturn sret; gchar *output_file = NULL; - gint ret = 0; #ifdef G_OS_UNIX guint signal_watch_id;