From 4f40ec0552fd1247c67580f145290c8ed835c6c4 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Mon, 10 Jan 2011 12:45:24 +0200 Subject: rtspdec: Retry with TCP if UDP failed Signed-off-by: Janne Grunau (cherry picked from commit 2762a7a28b261a505a9002b92d4f7c04eeaacc1b) --- libavformat/rtsp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libavformat/rtsp.c') 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; -- cgit v1.2.3