summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-07-12 12:14:12 +0300
committerMartin Storsjö <martin@martin.st>2013-07-14 20:53:04 +0300
commit1dd1b2332ebbac710d8e0214cec7595e118f2105 (patch)
tree517efdef247ee9ef21cf6f2ac41e58b1d7c95186 /libavformat/rtsp.c
parentdc79685195a45c9b8b17d7b93d118e0aefa45462 (diff)
rtsp: Include an User-Agent header field in all requests
Some rtsp servers like the IP Cam IcyBox IB-CAM2002 need it. Based on a patch by Carl Eugen Hoyos. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 761aa11540..29ef403a27 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1133,6 +1133,7 @@ static int rtsp_send_cmd_with_content_async(AVFormatContext *s,
if (headers)
av_strlcat(buf, headers, sizeof(buf));
av_strlcatf(buf, sizeof(buf), "CSeq: %d\r\n", rt->seq);
+ av_strlcatf(buf, sizeof(buf), "User-Agent: %s\r\n", LIBAVFORMAT_IDENT);
if (rt->session_id[0] != '\0' && (!headers ||
!strstr(headers, "\nIf-Match:"))) {
av_strlcatf(buf, sizeof(buf), "Session: %s\r\n", rt->session_id);