Commit 0ad306bc authored by Ronald S. Bultje's avatar Ronald S. Bultje

Remove unused code that used to handle protocol concatenation, i.e. trying

multiple protocols at the same time. We now cycle protocols individually
to autodetect, making this code no longer needed, and thus the support code
for it in make_setup_request() can be removed. See "[PATCH] remove transport
concatenation dead code" on mailinglist.

Originally committed as revision 15172 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 063ad820
...@@ -896,9 +896,6 @@ make_setup_request (AVFormatContext *s, const char *host, int port, ...@@ -896,9 +896,6 @@ make_setup_request (AVFormatContext *s, const char *host, int port,
rtsp_st = rt->rtsp_streams[i]; rtsp_st = rt->rtsp_streams[i];
/* compute available transports */
transport[0] = '\0';
/* RTP/UDP */ /* RTP/UDP */
if (protocol == RTSP_PROTOCOL_RTP_UDP) { if (protocol == RTSP_PROTOCOL_RTP_UDP) {
char buf[256]; char buf[256];
...@@ -923,9 +920,7 @@ make_setup_request (AVFormatContext *s, const char *host, int port, ...@@ -923,9 +920,7 @@ make_setup_request (AVFormatContext *s, const char *host, int port,
rtp_opened: rtp_opened:
port = rtp_get_local_port(rtsp_st->rtp_handle); port = rtp_get_local_port(rtsp_st->rtp_handle);
if (transport[0] != '\0') snprintf(transport, sizeof(transport) - 1,
av_strlcat(transport, ",", sizeof(transport));
snprintf(transport + strlen(transport), sizeof(transport) - strlen(transport) - 1,
"%s/UDP;unicast;client_port=%d", "%s/UDP;unicast;client_port=%d",
trans_pref, port); trans_pref, port);
if (rt->server_type == RTSP_SERVER_RTP) if (rt->server_type == RTSP_SERVER_RTP)
...@@ -934,17 +929,12 @@ make_setup_request (AVFormatContext *s, const char *host, int port, ...@@ -934,17 +929,12 @@ make_setup_request (AVFormatContext *s, const char *host, int port,
/* RTP/TCP */ /* RTP/TCP */
else if (protocol == RTSP_PROTOCOL_RTP_TCP) { else if (protocol == RTSP_PROTOCOL_RTP_TCP) {
if (transport[0] != '\0') snprintf(transport, sizeof(transport) - 1,
av_strlcat(transport, ",", sizeof(transport));
snprintf(transport + strlen(transport), sizeof(transport) - strlen(transport) - 1,
"%s/TCP", trans_pref); "%s/TCP", trans_pref);
} }
else if (protocol == RTSP_PROTOCOL_RTP_UDP_MULTICAST) { else if (protocol == RTSP_PROTOCOL_RTP_UDP_MULTICAST) {
if (transport[0] != '\0') snprintf(transport, sizeof(transport) - 1,
av_strlcat(transport, ",", sizeof(transport));
snprintf(transport + strlen(transport),
sizeof(transport) - strlen(transport) - 1,
"%s/UDP;multicast", trans_pref); "%s/UDP;multicast", trans_pref);
} }
if (rt->server_type == RTSP_SERVER_RDT) if (rt->server_type == RTSP_SERVER_RDT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment