From bec6dfcd5c0b59dd6d947ec3074986aeffd525aa Mon Sep 17 00:00:00 2001 From: Zhao Zhili Date: Wed, 15 Nov 2023 21:24:35 +0800 Subject: [PATCH] avformat/rtmpproto: Pass rw_timeout to underlying transport protocol Signed-off-by: Zhao Zhili --- libavformat/rtmpproto.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 98718bc6da..a0c6195eb2 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -2635,6 +2635,9 @@ static int rtmp_open(URLContext *s, const char *uri, int flags, AVDictionary **o if (rt->listen_timeout > 0) rt->listen = 1; + /* Pass rw_timeout to underlying transport protocol */ + if (s->rw_timeout > 0) + av_dict_set_int(opts, "rw_timeout", s->rw_timeout, 0); rt->is_input = !(flags & AVIO_FLAG_WRITE);