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