summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThijs Vermeir <thijsvermeir@gmail.com>2010-10-29 14:24:54 +0200
committerWim Taymans <wim.taymans@gmail.com>2010-10-29 14:22:39 +0100
commit2e888cb7849d5a22327578b545dfdf5f4355a2e9 (patch)
tree59597f5766f9afb6618439a8c417fd78f575dfb6
parent0750531378b12957cd4a891e6dd4158ba7409fc7 (diff)
rtsp: don't let the rtsp connection timeout
Because we should act before the rtsp server does a timeout, we reduce the timeout-time with 5 seconds, this should be safe to always keep te rtsp connection alive. https://bugzilla.gnome.org/show_bug.cgi?id=633455
-rw-r--r--gst-libs/gst/rtsp/gstrtspconnection.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c
index 39bf6086c..073852282 100644
--- a/gst-libs/gst/rtsp/gstrtspconnection.c
+++ b/gst-libs/gst/rtsp/gstrtspconnection.c
@@ -2486,7 +2486,9 @@ gst_rtsp_connection_next_timeout (GstRTSPConnection * conn, GTimeVal * timeout)
g_return_val_if_fail (conn != NULL, GST_RTSP_EINVAL);
g_return_val_if_fail (timeout != NULL, GST_RTSP_EINVAL);
- elapsed = g_timer_elapsed (conn->timer, &usec);
+ /* Because we should act before the timeout we timeout 5
+ * seconds in advance. */
+ elapsed = g_timer_elapsed (conn->timer, &usec) + 5;
if (elapsed >= conn->timeout) {
sec = 0;
usec = 0;