Commit fcd0298c authored by Jordi Ortiz's avatar Jordi Ortiz Committed by Luca Barbato

rtsp: Add content-type message header parsing

Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
parent b2e495af
...@@ -870,6 +870,9 @@ void ff_rtsp_parse_line(RTSPMessageHeader *reply, const char *buf, ...@@ -870,6 +870,9 @@ void ff_rtsp_parse_line(RTSPMessageHeader *reply, const char *buf,
} else if (av_stristart(p, "x-Accept-Dynamic-Rate:", &p) && rt) { } else if (av_stristart(p, "x-Accept-Dynamic-Rate:", &p) && rt) {
p += strspn(p, SPACE_CHARS); p += strspn(p, SPACE_CHARS);
rt->accept_dynamic_rate = atoi(p); rt->accept_dynamic_rate = atoi(p);
} else if (av_stristart(p, "Content-Type:", &p)) {
p += strspn(p, SPACE_CHARS);
av_strlcpy(reply->content_type, p, sizeof(reply->content_type));
} }
} }
......
...@@ -171,6 +171,11 @@ typedef struct RTSPMessageHeader { ...@@ -171,6 +171,11 @@ typedef struct RTSPMessageHeader {
* returned * returned
*/ */
char reason[256]; char reason[256];
/**
* Content type header
*/
char content_type[64];
} RTSPMessageHeader; } RTSPMessageHeader;
/** /**
......
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