From c8101aabee654f6d147a4d89f77fa73e18908610 Mon Sep 17 00:00:00 2001 From: Limin Wang Date: Tue, 3 Nov 2020 18:15:21 +0800 Subject: [PATCH] avformat/rtsp: support infinite initial_timeout for rtsp option Signed-off-by: Limin Wang --- libavformat/rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 49c2d52375..4427bd268f 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -2049,7 +2049,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st, } } #endif - } else if (n == 0 && --runs <= 0) { + } else if (n == 0 && rt->initial_timeout > 0 && --runs <= 0) { return AVERROR(ETIMEDOUT); } else if (n < 0 && errno != EINTR) return AVERROR(errno);