tests/common: disconnect commited handler

This commit is contained in:
Mathieu Duponchelle 2014-06-28 14:44:24 +02:00 committed by Thibault Saunier
parent 6dc52ca0d2
commit ab1d577a10

View file

@ -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);
}