Commit 22bb5bd7 authored by Gilles Chanteperdrix's avatar Gilles Chanteperdrix Committed by Michael Niedermayer

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: 's avatarGilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 642c49c9
......@@ -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,
......
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