summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/rtsp.c3
-rw-r--r--libavformat/rtsp.h4
-rw-r--r--libavformat/rtspdec.c3
3 files changed, 10 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 1f55016366..cbb19f42e8 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -706,6 +706,9 @@ void ff_rtsp_parse_line(RTSPMessageHeader *reply, const char *buf,
} else if (av_stristart(p, "Authentication-Info:", &p) && auth_state) {
p += strspn(p, SPACE_CHARS);
ff_http_auth_handle_header(auth_state, "Authentication-Info", p);
+ } else if (av_stristart(p, "Content-Base:", &p)) {
+ p += strspn(p, SPACE_CHARS);
+ av_strlcpy(reply->content_base, p , sizeof(reply->content_base));
}
}
diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h
index 8997532cc2..ba0526052b 100644
--- a/libavformat/rtsp.h
+++ b/libavformat/rtsp.h
@@ -165,6 +165,10 @@ typedef struct RTSPMessageHeader {
* returned
*/
char reason[256];
+
+ /** The "Content-Base:" field.
+ */
+ char content_base[4096];
} RTSPMessageHeader;
/**
diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index fd74b08c53..213f7095fb 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -105,6 +105,9 @@ int ff_rtsp_setup_input_streams(AVFormatContext *s, RTSPMessageHeader *reply)
av_freep(&content);
return AVERROR_INVALIDDATA;
}
+ if (reply->content_base[0])
+ av_strlcpy(rt->control_uri, reply->content_base,
+ sizeof(rt->control_uri));
av_log(s, AV_LOG_VERBOSE, "SDP:\n%s\n", content);
/* now we got the SDP description, we parse it */