Mercurial > libavformat.hg
diff rtsp.c @ 4169:619845a9bab3 libavformat
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.
author | rbultje |
---|---|
date | Wed, 07 Jan 2009 14:55:47 +0000 |
parents | 0ebf63d12ea4 |
children | 313d987dd2b4 |
line wrap: on
line diff
--- a/rtsp.c Wed Jan 07 14:53:04 2009 +0000 +++ b/rtsp.c Wed Jan 07 14:55:47 2009 +0000 @@ -688,6 +688,9 @@ } 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 @@ 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); }