aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtspdec.c
diff options
context:
space:
mode:
authorGilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>2015-02-22 07:59:55 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-22 14:09:26 +0100
commit22bb5bd7a3b55c25bfef130ad89e8574dd47af1d (patch)
treebf38a834fe8db8bab69f7012b57e34c9766e7a71 /libavformat/rtspdec.c
parent642c49c983df2f56b656ce668f2a0257a1939578 (diff)
downloadffmpeg-22bb5bd7a3b55c25bfef130ad89e8574dd47af1d.tar.gz
avformat/rtsp: punch holes again after pause
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 after each PLAY command to cause the router to restart the port redirection in that case. Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtspdec.c')
-rw-r--r--libavformat/rtspdec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index c8994988d5..f4255f24d2 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -542,6 +542,10 @@ static int rtsp_read_play(AVFormatContext *s)
AVStream *st = NULL;
if (!rtpctx || rtsp_st->stream_index < 0)
continue;
+ if (CONFIG_RTPDEC &&
+ !(rt->server_type == RTSP_SERVER_WMS && i > 1) && s->iformat)
+ ff_rtp_send_punch_packets(rtsp_st->rtp_handle);
+
st = s->streams[rtsp_st->stream_index];
rtpctx->range_start_offset =
av_rescale_q(reply->range_start, AV_TIME_BASE_Q,