validate: Connect to the bus signals watch as the main watch might already be connected

This commit is contained in:
Thibault Saunier 2013-08-15 12:18:56 +02:00 committed by Thiago Santos
parent de57b1455a
commit fc61dcf1ed

View file

@ -37,6 +37,7 @@ static gboolean
bus_callback (GstBus * bus, GstMessage * message, gpointer data)
{
GMainLoop *loop = data;
switch (GST_MESSAGE_TYPE (message)) {
case GST_MESSAGE_ERROR:
{
@ -140,7 +141,8 @@ main (int argc, gchar ** argv)
}
bus = gst_element_get_bus (pipeline);
gst_bus_add_watch (bus, bus_callback, mainloop);
gst_bus_add_signal_watch (bus);
g_signal_connect (bus, "message", (GCallback) bus_callback, mainloop);
gst_object_unref (bus);
g_print ("Starting pipeline\n");