mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
validate: Connect to the bus signals watch as the main watch might already be connected
This commit is contained in:
parent
de57b1455a
commit
fc61dcf1ed
1 changed files with 3 additions and 1 deletions
|
@ -37,6 +37,7 @@ static gboolean
|
||||||
bus_callback (GstBus * bus, GstMessage * message, gpointer data)
|
bus_callback (GstBus * bus, GstMessage * message, gpointer data)
|
||||||
{
|
{
|
||||||
GMainLoop *loop = data;
|
GMainLoop *loop = data;
|
||||||
|
|
||||||
switch (GST_MESSAGE_TYPE (message)) {
|
switch (GST_MESSAGE_TYPE (message)) {
|
||||||
case GST_MESSAGE_ERROR:
|
case GST_MESSAGE_ERROR:
|
||||||
{
|
{
|
||||||
|
@ -140,7 +141,8 @@ main (int argc, gchar ** argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
bus = gst_element_get_bus (pipeline);
|
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);
|
gst_object_unref (bus);
|
||||||
|
|
||||||
g_print ("Starting pipeline\n");
|
g_print ("Starting pipeline\n");
|
||||||
|
|
Loading…
Reference in a new issue