aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2010-08-12 13:39:38 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2010-08-12 13:39:38 +0000
commit27014bf5a3151f1e340d7ac170f3fdd3e0bcf395 (patch)
tree126481564264d7c47c7aead2dc39ec09521e43f7
parentd68776d54f2eaafc11744537e3dc254bffa42c43 (diff)
downloadffmpeg-27014bf5a3151f1e340d7ac170f3fdd3e0bcf395.tar.gz
Send OPTIONS request at a regular basis to standard RTSP servers as well,
this prevents a time-out which closes the TCP connection and kills our session. see "Re: [FFmpeg-devel] [PATCH] rtsp.c: keep-alive" thread on mailinglist. Originally committed as revision 24785 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/rtsp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 53051db8aa..36fe753915 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1902,9 +1902,7 @@ static int rtsp_read_packet(AVFormatContext *s, AVPacket *pkt)
return ret;
/* send dummy request to keep TCP connection alive */
- if ((rt->server_type == RTSP_SERVER_WMS ||
- rt->server_type == RTSP_SERVER_REAL) &&
- (av_gettime() - rt->last_cmd_time) / 1000000 >= rt->timeout / 2) {
+ if ((av_gettime() - rt->last_cmd_time) / 1000000 >= rt->timeout / 2) {
if (rt->server_type == RTSP_SERVER_WMS) {
ff_rtsp_send_cmd_async(s, "GET_PARAMETER", rt->control_uri, NULL);
} else {