From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id A5B7F45F3A for ; Thu, 20 Jul 2023 17:01:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BCD1D68C116; Thu, 20 Jul 2023 20:01:22 +0300 (EEST) Received: from btbn.de (btbn.de [136.243.74.85]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 61CE068BF0C for ; Thu, 20 Jul 2023 20:01:16 +0300 (EEST) Received: from [authenticated] by btbn.de (Postfix) with ESMTPSA id B32A027C7E3; Thu, 20 Jul 2023 19:01:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothenpieler.org; s=mail; t=1689872475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=uE7uccdVV51F4NcipInvveq9jZh3ek/zmeYadvQ+SKU=; b=LIAQSqZFpht7toePCpnrxd/XhT1qklSOYcq3FgUaeE2WvIO+T5xSUnNpp3l7KKOGMvE6k8 5aDPBl8605QxgEPBsvKwp1u7ECwIQeJDa1iyPmUHh1svC0Hkkf6yEh/PmLaLtVdVEWlFox JnpDOZo/i7AVyncOhpMtnFBLBVrQ6+mbEdaw7+vPM1KwNPspcMQM41GDeQG7UQNKi8YtLx KWB/fWgmciw+aLzNJi1bNPeVTGsE5vKLeuSempTpM5efVltuUA9T/zXC8XZUWpgQBQ4pIz nI2iQREhrHArMo0nTM+rYMHSZE1jMCNP63z2EmA0276dHWUxbGwbhpQdQ1eK3g== From: Timo Rothenpieler To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Jul 2023 19:01:08 +0200 Message-Id: <20230720170108.2854-1-timo@rothenpieler.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/rtmpproto: forward rw_timeout to tcp proto X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Timo Rothenpieler Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --- libavformat/rtmpproto.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index f0ef223f05..a18cc78eac 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -127,6 +127,7 @@ typedef struct RTMPContext { int nb_streamid; ///< The next stream id to return on createStream calls double duration; ///< Duration of the stream in seconds as returned by the server (only valid if non-zero) int tcp_nodelay; ///< Use TCP_NODELAY to disable Nagle's algorithm if set to 1 + int rw_timeout; ///< timeout of socket I/O operations char username[50]; char password[50]; char auth_params[500]; @@ -2656,10 +2657,12 @@ static int rtmp_open(URLContext *s, const char *uri, int flags, AVDictionary **o port = RTMP_DEFAULT_PORT; if (rt->listen) ff_url_join(buf, sizeof(buf), "tcp", NULL, hostname, port, - "?listen&listen_timeout=%d&tcp_nodelay=%d", - rt->listen_timeout * 1000, rt->tcp_nodelay); + "?listen&listen_timeout=%d&timeout=%d&tcp_nodelay=%d", + rt->listen_timeout * 1000, rt->rw_timeout, + rt->tcp_nodelay); else - ff_url_join(buf, sizeof(buf), "tcp", NULL, hostname, port, "?tcp_nodelay=%d", rt->tcp_nodelay); + ff_url_join(buf, sizeof(buf), "tcp", NULL, hostname, port, + "?tcp_nodelay=%d&timeout=%d", rt->tcp_nodelay, rt->rw_timeout); } reconnect: @@ -3120,6 +3123,7 @@ static const AVOption rtmp_options[] = { {"listen", "Listen for incoming rtmp connections", OFFSET(listen), AV_OPT_TYPE_INT, {.i64 = 0}, INT_MIN, INT_MAX, DEC, "rtmp_listen" }, {"tcp_nodelay", "Use TCP_NODELAY to disable Nagle's algorithm", OFFSET(tcp_nodelay), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, DEC|ENC}, {"timeout", "Maximum timeout (in seconds) to wait for incoming connections. -1 is infinite. Implies -rtmp_listen 1", OFFSET(listen_timeout), AV_OPT_TYPE_INT, {.i64 = -1}, INT_MIN, INT_MAX, DEC, "rtmp_listen" }, + {"rw_timeout", "Maximum timeout (in microseconds) to wait for socket i/o. -1 is infinite.", OFFSET(rw_timeout), AV_OPT_TYPE_INT, {.i64 = -1}, INT_MIN, INT_MAX, DEC|ENC }, { NULL }, }; -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".