diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 2ad2c4dcf2..31eb4befd6 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -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) { p += strspn(p, SPACE_CHARS); 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)); } } diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h index 6872a51a24..e512336ab0 100644 --- a/libavformat/rtsp.h +++ b/libavformat/rtsp.h @@ -171,6 +171,11 @@ typedef struct RTSPMessageHeader { * returned */ char reason[256]; + + /** + * Content type header + */ + char content_type[64]; } RTSPMessageHeader; /**