From patchwork Mon Feb 17 00:36:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 17807 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id C8B4F44AC15 for ; Mon, 17 Feb 2020 02:37:22 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A56B66880E7; Mon, 17 Feb 2020 02:37:22 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2FD3B687F3D for ; Mon, 17 Feb 2020 02:37:17 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id AF683E38A5; Mon, 17 Feb 2020 01:37:16 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s805MA9mBzze; Mon, 17 Feb 2020 01:37:15 +0100 (CET) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 351F9E36B4; Mon, 17 Feb 2020 01:37:15 +0100 (CET) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Mon, 17 Feb 2020 01:36:45 +0100 Message-Id: <20200217003653.20027-1-cus@passwd.hu> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200213231624.28373-1-cus@passwd.hu> References: <20200213231624.28373-1-cus@passwd.hu> Subject: [FFmpeg-devel] [PATCH v2 1/9] avformat/libsrt: fix timeout unit confusion between milisec and microsec X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: Marton Balint MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Marton Balint --- libavformat/libsrt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c index d7faa603f5..1d748f0e81 100644 --- a/libavformat/libsrt.c +++ b/libavformat/libsrt.c @@ -210,7 +210,7 @@ static int libsrt_network_wait_fd_timeout(URLContext *h, int eid, int fd, int wr } } -static int libsrt_listen(int eid, int fd, const struct sockaddr *addr, socklen_t addrlen, URLContext *h, int timeout) +static int libsrt_listen(int eid, int fd, const struct sockaddr *addr, socklen_t addrlen, URLContext *h, int64_t timeout) { int ret; int reuse = 1; @@ -243,7 +243,7 @@ static int libsrt_listen(int eid, int fd, const struct sockaddr *addr, socklen_t return ret; } -static int libsrt_listen_connect(int eid, int fd, const struct sockaddr *addr, socklen_t addrlen, int timeout, URLContext *h, int will_try_next) +static int libsrt_listen_connect(int eid, int fd, const struct sockaddr *addr, socklen_t addrlen, int64_t timeout, URLContext *h, int will_try_next) { int ret; @@ -447,7 +447,7 @@ static int libsrt_setup(URLContext *h, const char *uri, int flags) } if (s->mode == SRT_MODE_LISTENER) { // multi-client - if ((ret = libsrt_listen(s->eid, fd, cur_ai->ai_addr, cur_ai->ai_addrlen, h, open_timeout / 1000)) < 0) + if ((ret = libsrt_listen(s->eid, fd, cur_ai->ai_addr, cur_ai->ai_addrlen, h, open_timeout)) < 0) goto fail1; fd = ret; } else { @@ -458,7 +458,7 @@ static int libsrt_setup(URLContext *h, const char *uri, int flags) } if ((ret = libsrt_listen_connect(s->eid, fd, cur_ai->ai_addr, cur_ai->ai_addrlen, - open_timeout / 1000, h, !!cur_ai->ai_next)) < 0) { + open_timeout, h, !!cur_ai->ai_next)) < 0) { if (ret == AVERROR_EXIT) goto fail1; else