Commit 0d846d4c authored by Joakim Johansson's avatar Joakim Johansson Committed by Sebastian Dröge

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
parent dd1b600d
...@@ -1056,7 +1056,7 @@ do_send_data (GstBuffer * buffer, guint8 channel, GstRTSPClient * client) ...@@ -1056,7 +1056,7 @@ do_send_data (GstBuffer * buffer, guint8 channel, GstRTSPClient * client)
{ {
GstRTSPClientPrivate *priv = client->priv; GstRTSPClientPrivate *priv = client->priv;
GstRTSPMessage message = { 0 }; GstRTSPMessage message = { 0 };
GstRTSPResult res = GST_RTSP_OK; gboolean ret = TRUE;
GstMapInfo map_info; GstMapInfo map_info;
guint8 *data; guint8 *data;
guint usize; guint usize;
...@@ -1071,7 +1071,7 @@ do_send_data (GstBuffer * buffer, guint8 channel, GstRTSPClient * client) ...@@ -1071,7 +1071,7 @@ do_send_data (GstBuffer * buffer, guint8 channel, GstRTSPClient * client)
g_mutex_lock (&priv->send_lock); g_mutex_lock (&priv->send_lock);
if (priv->send_func) 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); g_mutex_unlock (&priv->send_lock);
gst_rtsp_message_steal_body (&message, &data, &usize); gst_rtsp_message_steal_body (&message, &data, &usize);
...@@ -1079,7 +1079,7 @@ do_send_data (GstBuffer * buffer, guint8 channel, GstRTSPClient * client) ...@@ -1079,7 +1079,7 @@ do_send_data (GstBuffer * buffer, guint8 channel, GstRTSPClient * client)
gst_rtsp_message_unset (&message); gst_rtsp_message_unset (&message);
return res == GST_RTSP_OK; return ret;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment