aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2009-01-07 14:55:47 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2009-01-07 14:55:47 +0000
commit7a86bafa20aca6cdb38c425d23aa5aaf4271210a (patch)
tree385ed2f5a548736002535e93f3fad9297611f892 /libavformat/rtsp.c
parent74272b1c0cb4b90da324eec78c7dbe74e3993a77 (diff)
downloadffmpeg-7a86bafa20aca6cdb38c425d23aa5aaf4271210a.tar.gz
Use the "server" RTSP field to detect whether the server that we're talking
to is a Microsoft Windows Media Server (the field will be "WMServer/version"). See "[PATCH] RTSP-MS 3/15: Add Windows Media Server type" thread on mailinglist. Originally committed as revision 16472 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 2ba1755b28..26bae089dd 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -688,6 +688,9 @@ void rtsp_parse_line(RTSPHeader *reply, const char *buf)
} else if (av_stristart(p, "RealChallenge1:", &p)) {
skip_spaces(&p);
av_strlcpy(reply->real_challenge, p, sizeof(reply->real_challenge));
+ } else if (av_stristart(p, "Server:", &p)) {
+ skip_spaces(&p);
+ av_strlcpy(reply->server, p, sizeof(reply->server));
}
}
@@ -1123,6 +1126,8 @@ static int rtsp_read_header(AVFormatContext *s,
if (rt->server_type != RTSP_SERVER_REAL && reply->real_challenge[0]) {
rt->server_type = RTSP_SERVER_REAL;
continue;
+ } else if (!strncasecmp(reply->server, "WMServer/", 9)) {
+ rt->server_type = RTSP_SERVER_WMS;
} else if (rt->server_type == RTSP_SERVER_REAL) {
strcpy(real_challenge, reply->real_challenge);
}