mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
tests/common: disconnect commited handler
This commit is contained in:
parent
6dc52ca0d2
commit
ab1d577a10
1 changed files with 2 additions and 1 deletions
|
@ -361,9 +361,10 @@ commited_cb (GstElement * comp, gboolean changed)
|
|||
void
|
||||
commit_and_wait (GstElement * comp, gboolean * ret)
|
||||
{
|
||||
g_signal_connect (comp, "commited", (GCallback) commited_cb, NULL);
|
||||
gulong handler_id = g_signal_connect (comp, "commited", (GCallback) commited_cb, NULL);
|
||||
g_mutex_lock (&lock);
|
||||
g_signal_emit_by_name (comp, "commit", TRUE, ret);
|
||||
g_cond_wait (&cond, &lock);
|
||||
g_mutex_unlock (&lock);
|
||||
g_signal_handler_disconnect (comp, handler_id);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue