aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2014-09-24 11:31:18 +0300
committerMartin Storsjö <martin@martin.st>2014-09-24 23:34:02 +0300
commit2f172f1ae984b763c06069adb51d0053b3834f4b (patch)
tree9d3b60a561ccc8cd690ad88b7eda953ef8c180cf
parentddf5fb71ee9c8b2d9a23c0f661a84896cd7050fc (diff)
downloadffmpeg-2f172f1ae984b763c06069adb51d0053b3834f4b.tar.gz
rtsp: Clear the session id on redirects
This fixes handling redirects in case the server provided a session id within the redirect reply. Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavformat/rtsp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 23d7da1b1b..646712e5ab 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1812,6 +1812,7 @@ redirect:
ff_rtsp_close_connections(s);
if (reply->status_code >=300 && reply->status_code < 400 && s->iformat) {
av_strlcpy(s->filename, reply->location, sizeof(s->filename));
+ rt->session_id[0] = '\0';
av_log(s, AV_LOG_INFO, "Status %d: Redirecting to %s\n",
reply->status_code,
s->filename);