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
This commit is contained in:
Thijs Vermeir 2010-10-29 14:24:54 +02:00 committed by Wim Taymans
parent 0750531378
commit 2e888cb784

View file

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