summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-01-10 12:45:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-01-26 03:43:29 +0100
commit4f40ec0552fd1247c67580f145290c8ed835c6c4 (patch)
tree8ae59b6e3dc7cdb721731c9b710b557132682a8d /libavformat/rtsp.c
parent2afd30bf7ab098f7471d851dc5f7a9adad43d35a (diff)
rtspdec: Retry with TCP if UDP failed
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net> (cherry picked from commit 2762a7a28b261a505a9002b92d4f7c04eeaacc1b)
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index dddaaf4237..ca9ce7cf21 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1291,7 +1291,7 @@ int ff_rtsp_connect(AVFormatContext *s)
int port, err, tcp_fd;
RTSPMessageHeader reply1 = {0}, *reply = &reply1;
int lower_transport_mask = 0;
- char real_challenge[64];
+ char real_challenge[64] = "";
struct sockaddr_storage peer;
socklen_t peer_len = sizeof(peer);
@@ -1515,6 +1515,8 @@ redirect:
}
} while (err);
+ rt->lower_transport_mask = lower_transport_mask;
+ av_strlcpy(rt->real_challenge, real_challenge, sizeof(rt->real_challenge));
rt->state = RTSP_STATE_IDLE;
rt->seek_timestamp = 0; /* default is to start stream at position zero */
return 0;