From patchwork Wed Sep 20 00:01:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 5198 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.36.26 with SMTP id f26csp132080jaa; Tue, 19 Sep 2017 17:01:10 -0700 (PDT) X-Google-Smtp-Source: AOwi7QATcbYxNf5FwuladxNRXn+fnQBd80eG8QwStLZAvLgQexWSW1MywaZM05AakaGiwVTv4d+f X-Received: by 10.223.133.218 with SMTP id 26mr2770193wru.26.1505865670352; Tue, 19 Sep 2017 17:01:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505865670; cv=none; d=google.com; s=arc-20160816; b=zyugJRwnJBH+R2/RPJax+jolIi1l+VRzHRzt+6BV83xcf7eOG3clC/hmRJol/6vfjZ E8YqqNhJGMcUv2pi04Z8ZhGnu88HUu8ukCbtX+Ie1FUTuteLLMlspz6GWUATqNGZ1z8i jYQ2Mj2snQGtKfHFO12eC2VyT584t7glPmJC85Q2CAvrHNo4E6uhivKE2IVbTn1VYaI9 03i81BIniI9ZSX1NdiEqGwMl9XEuelz9txsaIhtEZtep/ZPKLy5jM3aflFWrhh3b46aS EnngBYbVUlXmoliQ+3o00mNxhbXgvht2Bic5CeXihiH143cXzwDtHoU8p0goqB2XB8QA xkVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:user-agent:references:message-id :in-reply-to:to:from:date:delivered-to:arc-authentication-results; bh=1ukukCxFM0lXCOlOYkh0rOnLgap6mruM+lG/9S1TZXw=; b=Z7YjKkxWgpM7sX3mos1FROtacdR9CK+S/Y10/iXt7XOhXsaWQVy8qfbLdbd/7Sp6RL zeMdbyrfhTaKGffeyxzVyTRfA6+OJJ6D1ldMmkoZ4pI6yU5Ppw4F/33RquSQH72OtXNW 1OQH0to2LFP2s5ztEJtIIUoNewjoN1ALNhfBj1Y7XJY6VP1IqEGtkixmTvy3R7/owUU1 tVJB1WeuGTtM+qlEWVssIqlf6busWDCITxSJngms3dNhz6L6lgtaBg7/Sw4fKtJZAYa1 wCptIci7oz+F8JJJ7mRptUsr7/c40oYifeTj87TXnBpWRBrjaYQnOj4CLJA+YLbMN5ag eySw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id k128si328941wmb.181.2017.09.19.17.01.09; Tue, 19 Sep 2017 17:01:10 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9C9CC68972F; Wed, 20 Sep 2017 03:00:59 +0300 (EEST) 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 ADB7C68839A for ; Wed, 20 Sep 2017 03:00:53 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 8FFA9E112D for ; Wed, 20 Sep 2017 02:01:02 +0200 (CEST) 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 LO97B8bYKNoa for ; Wed, 20 Sep 2017 02:01:01 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 5D28EE1069 for ; Wed, 20 Sep 2017 02:01:01 +0200 (CEST) Date: Wed, 20 Sep 2017 02:01:01 +0200 (CEST) From: Marton Balint X-X-Sender: cus@iq To: FFmpeg development discussions and patches In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH]lavf/rtsp: Allow to set SDP timeout. 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" On Wed, 20 Sep 2017, Carl Eugen Hoyos wrote: > Hi! > > Attached patch fixes part of ticket #2415. > > Please comment, Carl Eugen > Yeah, I know it requires some additional changes in the code, but not too much I assume. Regards, Marton diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 0bd72dc..c8fa26a 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -104,6 +104,7 @@ static const AVOption sdp_options[] = { RTSP_FLAG_OPTS("sdp_flags", "SDP flags"), { "custom_io", "use custom I/O", 0, AV_OPT_TYPE_CONST, {.i64 = RTSP_FLAG_CUSTOM_IO}, 0, 0, DEC, "rtsp_flags" }, { "rtcp_to_source", "send RTCP packets to the source address of received packets", 0, AV_OPT_TYPE_CONST, {.i64 = RTSP_FLAG_RTCP_TO_SOURCE}, 0, 0, DEC, "rtsp_flags" }, + { "timeout", "set timeout (in tenths of a seconds)", OFFSET(initial_timeout), AV_OPT_TYPE_INT, {.i64 = MAX_TIMEOUTS}, 0, 1000000, DEC }, I'd prefer AV_OPT_TYPE_DURATION for every new duration-like option, it is already messy where you need to specify milisecs, microsecs, or seconds...