summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-01-02 10:11:12 +0000
committerMartin Storsjö <martin@martin.st>2011-01-02 10:11:12 +0000
commitd2995eb910151cb83259223c2af6c665949ae6d0 (patch)
tree5a7d87b7b630657c108179c1a1f828848192d07e /libavformat/rtsp.c
parent77223c5388ca7bfea2232afeb05b05fcc536de6f (diff)
rtsp: Store the Content-Base header value straight to the target
This avoids having a large temporary buffer in the struct used for storing the rtsp reply headers. Originally committed as revision 26192 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 4ba5cefbfb..431703e205 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -724,9 +724,10 @@ void ff_rtsp_parse_line(RTSPMessageHeader *reply, const char *buf,
} else if (av_stristart(p, "Authentication-Info:", &p) && rt) {
p += strspn(p, SPACE_CHARS);
ff_http_auth_handle_header(&rt->auth_state, "Authentication-Info", p);
- } else if (av_stristart(p, "Content-Base:", &p)) {
+ } else if (av_stristart(p, "Content-Base:", &p) && rt) {
p += strspn(p, SPACE_CHARS);
- av_strlcpy(reply->content_base, p , sizeof(reply->content_base));
+ if (method && !strcmp(method, "DESCRIBE"))
+ av_strlcpy(rt->control_uri, p , sizeof(rt->control_uri));
}
}