From cdcc370293a159c321e41af7f0eef141c62d698d Mon Sep 17 00:00:00 2001 From: Gilles Chanteperdrix Date: Sun, 22 Feb 2015 07:59:55 +0100 Subject: rtsp: punch holes again after pause MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a client behind a NAT issues a pause command, and stay paused for a long time, the router may stop the RTP/RTCP port redirection. Resend the hole punching packets before each PLAY command to cause the router to restart the port redirection in that case. Move the existing code for sending the packets from the SETUP phase to the PLAY phase. Signed-off-by: Martin Storsjö --- libavformat/rtsp.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'libavformat/rtsp.c') diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index ce5039ac87..77f6eb2501 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1537,13 +1537,6 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, err = AVERROR_INVALIDDATA; goto fail; } - /* Try to initialize the connection state in a - * potential NAT router by sending dummy packets. - * RTP/RTCP dummy packets are used for RDT, too. - */ - if (CONFIG_RTPDEC && - !(rt->server_type == RTSP_SERVER_WMS && i > 1) && s->iformat) - ff_rtp_send_punch_packets(rtsp_st->rtp_handle); break; } case RTSP_LOWER_TRANSPORT_UDP_MULTICAST: { -- cgit v1.2.3