Mercurial > libavformat.hg
comparison rtsp.c @ 5665:93b0d64bf0c9 libavformat
When using RTP-over-UDP, send dummy packets during stream setup, similar to
what e.g. RealPlayer does. This allows proper port forwarding setup in NAT-
based environments.
Patch by Martin Storsj <$firstname at $firstname dot st>.
author | rbultje |
---|---|
date | Tue, 16 Feb 2010 22:50:50 +0000 |
parents | ebf397240c91 |
children | 9b2e63adc0fa |
comparison
equal
deleted
inserted
replaced
5664:6c380241df7c | 5665:93b0d64bf0c9 |
---|---|
1144 if (!(rt->server_type == RTSP_SERVER_WMS && i > 1) && | 1144 if (!(rt->server_type == RTSP_SERVER_WMS && i > 1) && |
1145 rtp_set_remote_url(rtsp_st->rtp_handle, url) < 0) { | 1145 rtp_set_remote_url(rtsp_st->rtp_handle, url) < 0) { |
1146 err = AVERROR_INVALIDDATA; | 1146 err = AVERROR_INVALIDDATA; |
1147 goto fail; | 1147 goto fail; |
1148 } | 1148 } |
1149 /* Try to initialize the connection state in a | |
1150 * potential NAT router by sending dummy packets. | |
1151 * RTP/RTCP dummy packets are used for RDT, too. | |
1152 */ | |
1153 if (!(rt->server_type == RTSP_SERVER_WMS && i > 1)) | |
1154 rtp_send_punch_packets(rtsp_st->rtp_handle); | |
1149 break; | 1155 break; |
1150 } | 1156 } |
1151 case RTSP_LOWER_TRANSPORT_UDP_MULTICAST: { | 1157 case RTSP_LOWER_TRANSPORT_UDP_MULTICAST: { |
1152 char url[1024]; | 1158 char url[1024]; |
1153 struct in_addr in; | 1159 struct in_addr in; |