validate: Avoid assert removing an already removed signal handler

And, make sure that we set the return value != 0 when we receive
SIGINT
This commit is contained in:
Thibault Saunier 2014-12-03 11:28:28 +01:00
parent 272032c0b0
commit 1bc32a888f

View file

@ -39,6 +39,7 @@
#include <glib-unix.h>
#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;