]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
IPTV RTSP: fix periodic options call (full URL + timeout) for another IPTV source
authorJaroslav Kysela <perex@perex.cz>
Sat, 16 May 2015 20:30:18 +0000 (22:30 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sat, 16 May 2015 20:30:33 +0000 (22:30 +0200)
src/input/mpegts/iptv/iptv_rtsp.c

index 04ec6451528d260714054858c69f2baf8e7503cf..17d82ff8dd4e31456ed80f74a82daa51b921a5cd 100644 (file)
@@ -48,8 +48,9 @@ iptv_rtsp_alive_cb ( void *aux )
   iptv_mux_t *im = aux;
   rtsp_priv_t *rp = im->im_data;
 
-  rtsp_options(rp->hc);
-  gtimer_arm(&rp->alive_timer, iptv_rtsp_alive_cb, im, rp->hc->hc_rtp_timeout / 2);
+  rtsp_send(rp->hc, RTSP_CMD_OPTIONS, rp->path, rp->query, NULL);
+  gtimer_arm(&rp->alive_timer, iptv_rtsp_alive_cb, im,
+             MAX(1, (rp->hc->hc_rtp_timeout / 2) - 1));
 }
 
 /*
@@ -91,7 +92,8 @@ iptv_rtsp_header ( http_client_t *hc )
     hc->hc_cmd = HTTP_CMD_NONE;
     pthread_mutex_lock(&global_lock);
     iptv_input_mux_started(hc->hc_aux);
-    gtimer_arm(&rp->alive_timer, iptv_rtsp_alive_cb, im, hc->hc_rtp_timeout / 2);
+    gtimer_arm(&rp->alive_timer, iptv_rtsp_alive_cb, im,
+               MAX(1, (hc->hc_rtp_timeout / 2) - 1));
     pthread_mutex_unlock(&global_lock);
     break;
   default: