[FFmpeg-devel] [PATCH] avformat/rtsp: Set timeouts also when reading header

Kacper Michajłow kasper93 at gmail.com
Sat May 11 13:46:51 EEST 2024


Signed-off-by: Kacper Michajłow <kasper93 at gmail.com>
---
 libavformat/rtsp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index b0c61ee00a..4b067ee76b 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -135,6 +135,8 @@ static AVDictionary *map_to_opts(RTSPState *rt)
     av_dict_set_int(&opts, "pkt_size",    rt->pkt_size,    0);
     if (rt->localaddr && rt->localaddr[0])
         av_dict_set(&opts, "localaddr", rt->localaddr, 0);
+    av_dict_set_int(&opts, "listen_timeout", rt->initial_timeout, 0);
+    av_dict_set_int(&opts, "timeout", rt->stimeout, 0);
 
     return opts;
 }
-- 
2.43.0



More information about the ffmpeg-devel mailing list