From 808b49cbfc9cd7f5df5b36a6a66f918cfb8c65b6 Mon Sep 17 00:00:00 2001 From: Joakim Johansson Date: Tue, 17 Apr 2018 11:03:11 +0200 Subject: [PATCH] rtsp-client: Fix session timeout When streaming data over TCP then is not the keep-alive functionality working. The reason is that the function do_send_data have changed to boolean but the code is still checking the received result from send_func with GST_RTSP_OK. The result is that a successful send_func will always lead to that do_send_data is returning false and the keep-alive will not be updated. https://bugzilla.gnome.org/show_bug.cgi?id=795321 --- gst/rtsp-server/rtsp-client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c index 724065f378..d987c1f978 100644 --- a/gst/rtsp-server/rtsp-client.c +++ b/gst/rtsp-server/rtsp-client.c @@ -1065,7 +1065,7 @@ do_send_data (GstBuffer * buffer, guint8 channel, GstRTSPClient * client) { GstRTSPClientPrivate *priv = client->priv; GstRTSPMessage message = { 0 }; - GstRTSPResult res = GST_RTSP_OK; + gboolean ret = TRUE; GstMapInfo map_info; guint8 *data; guint usize; @@ -1080,7 +1080,7 @@ do_send_data (GstBuffer * buffer, guint8 channel, GstRTSPClient * client) g_mutex_lock (&priv->send_lock); if (priv->send_func) - res = priv->send_func (client, &message, FALSE, priv->send_data); + ret = priv->send_func (client, &message, FALSE, priv->send_data); g_mutex_unlock (&priv->send_lock); gst_rtsp_message_steal_body (&message, &data, &usize); @@ -1088,7 +1088,7 @@ do_send_data (GstBuffer * buffer, guint8 channel, GstRTSPClient * client) gst_rtsp_message_unset (&message); - return res == GST_RTSP_OK; + return ret; } /**