mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 06:26:23 +00:00
mixers: fix leaks in tests
- GstMessage and GstBus references were lost - Need to call gst_bus_remove_signal_watch() for each gst_bus_add_signal_watch_full() call https://bugzilla.gnome.org/show_bug.cgi?id=778248
This commit is contained in:
parent
c5f59a319b
commit
da851b254d
1 changed files with 6 additions and 0 deletions
|
@ -126,11 +126,14 @@ GST_START_TEST (simple_audio_mixed_with_pipeline)
|
||||||
} else if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR)
|
} else if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR)
|
||||||
fail_error_message (message);
|
fail_error_message (message);
|
||||||
|
|
||||||
|
gst_message_unref (message);
|
||||||
GST_INFO ("running main loop");
|
GST_INFO ("running main loop");
|
||||||
g_main_loop_run (main_loop);
|
g_main_loop_run (main_loop);
|
||||||
g_main_loop_unref (main_loop);
|
g_main_loop_unref (main_loop);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
gst_bus_remove_signal_watch (bus);
|
||||||
|
gst_object_unref (bus);
|
||||||
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);
|
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);
|
||||||
gst_object_unref (pipeline);
|
gst_object_unref (pipeline);
|
||||||
}
|
}
|
||||||
|
@ -183,11 +186,14 @@ GST_START_TEST (audio_video_mixed_with_pipeline)
|
||||||
} else if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR)
|
} else if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR)
|
||||||
fail_error_message (message);
|
fail_error_message (message);
|
||||||
|
|
||||||
|
gst_message_unref (message);
|
||||||
GST_INFO ("running main loop");
|
GST_INFO ("running main loop");
|
||||||
g_main_loop_run (main_loop);
|
g_main_loop_run (main_loop);
|
||||||
g_main_loop_unref (main_loop);
|
g_main_loop_unref (main_loop);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
gst_bus_remove_signal_watch (bus);
|
||||||
|
gst_object_unref (bus);
|
||||||
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);
|
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);
|
||||||
gst_object_unref (pipeline);
|
gst_object_unref (pipeline);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue