mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
client: call destroy without the lock
This commit is contained in:
parent
33da3af265
commit
eb88fa9e76
1 changed files with 9 additions and 3 deletions
|
@ -1909,15 +1909,21 @@ void
|
||||||
gst_rtsp_client_set_send_func (GstRTSPClient * client,
|
gst_rtsp_client_set_send_func (GstRTSPClient * client,
|
||||||
GstRTSPClientSendFunc func, gpointer user_data, GDestroyNotify notify)
|
GstRTSPClientSendFunc func, gpointer user_data, GDestroyNotify notify)
|
||||||
{
|
{
|
||||||
|
GstRTSPClientSendFunc old_func;
|
||||||
|
gpointer old_data;
|
||||||
|
|
||||||
g_return_if_fail (GST_IS_RTSP_CLIENT (client));
|
g_return_if_fail (GST_IS_RTSP_CLIENT (client));
|
||||||
|
|
||||||
g_mutex_lock (&client->lock);
|
g_mutex_lock (&client->lock);
|
||||||
client->send_func = func;
|
client->send_func = func;
|
||||||
if (client->send_notify)
|
old_func = client->send_notify;
|
||||||
client->send_notify (client->send_data);
|
old_data = client->send_data;
|
||||||
client->send_data = user_data;
|
|
||||||
client->send_notify = notify;
|
client->send_notify = notify;
|
||||||
|
client->send_data = user_data;
|
||||||
g_mutex_unlock (&client->lock);
|
g_mutex_unlock (&client->lock);
|
||||||
|
|
||||||
|
if (old_func)
|
||||||
|
old_func (old_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue