From 1dd1b2332ebbac710d8e0214cec7595e118f2105 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Fri, 12 Jul 2013 12:14:12 +0300 Subject: rtsp: Include an User-Agent header field in all requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ö --- libavformat/rtsp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libavformat/rtsp.c') 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); -- cgit v1.2.3