Commit 1dd1b233 authored by Martin Storsjö's avatar Martin Storsjö

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: 's avatarMartin Storsjö <martin@martin.st>
parent dc796851
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment