From patchwork Sun Jul 4 15:40:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andriy Gelman X-Patchwork-Id: 28756 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5d:965a:0:0:0:0:0 with SMTP id d26csp3387140ios; Sun, 4 Jul 2021 08:41:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRGyxjRQvVQ+mQtkYDwxwt8yE2+/cbxZ0BdgTAobZ8eBPF41syl9vbUQoRQhxqqNppz3ct X-Received: by 2002:a17:906:bb0e:: with SMTP id jz14mr9121974ejb.285.1625413286616; Sun, 04 Jul 2021 08:41:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625413286; cv=none; d=google.com; s=arc-20160816; b=qV+UMusoUh6kx7Yyzkb388sMxaLJrF8z5mdJ1bcnxo4Pr45lLsgFJ2hZVmc1YLom84 UkuBQy0DssB0fb9q9W3pp7t26pcB6sZviZdu4/N69Pa7xid9CcXvWQ27odBnwpIcOInC bwSnxh5yruwDmWvDZm+W5LVqN9GJAVoZN8j51SNxXwRdkLhlvTQ2I4KACWqRYDrhmOeB SIbQc3TdU+GGMI2r5YN8PsXWTmTNH0u4PLRu5uTuXO0ZLhock2TinRbhqZamHIwP7Kmu 61N/fVUAJqZ1+7Q1yJCJlrX1HAcPJmmsSFO0JRWNOze7FTtHn2Ckug/ekToXyax5XSG3 u9WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=UP/jWH79oKayXBuVuy9+y3qwQT2f49ixE/iqEuS5Sg4=; b=oBIuwMmoGpEJdgHUu0PSEHwuJf7x9EJT9dufB+5uxpCylrI1jsnpY6Tr5vFHqNvshc 5KmvGJMKeW/kU+JwlHmf+2EJbD3PNaGU16PUhV1J2wSVQ/ZxRMvBRGa56UH7eirieFW6 Q0IpZ/lb2gAhT+HlWqdlvxjjU48nvTXu0czUmB3HkfVLkTttwj9eNucppo+LbM9fc+26 AOlSpswyNPia4suYJ6ZeO8kMyuoqyandTrNBaNzvlPlYkDeodObbTgCieV8i47yvJtqC fcdndv/MlkfYazLyfrUcmR9ZKTUN8Pz5TXvlmE2IqRLLUqDkL471zNMKpCYhOYGN0+TG RsYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=uAebWqr1; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u12si8879431edq.493.2021.07.04.08.41.26; Sun, 04 Jul 2021 08:41:26 -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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=uAebWqr1; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 83E0D68A5E4; Sun, 4 Jul 2021 18:41:11 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E2FC768A5CC for ; Sun, 4 Jul 2021 18:41:04 +0300 (EEST) Received: by mail-qt1-f181.google.com with SMTP id w22so4602568qtj.8 for ; Sun, 04 Jul 2021 08:41:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wGhtDIpDHIRLrTJ2witXc672TBgfiJDb2jx4BcS6kwI=; b=uAebWqr1cOihIMlWeoX9NynLNrTwF4+2xQqLk36q0Gtg3Vn0EJcyIUtOI2L4QAR4ud dvhIi6HDGHBICPeH47WUAII12VIdc4wHR6RP1JPkGyZUKZc8Fn3YAMB9yguIVAS2NAAO hYvmZxVEJ0eQXe92a9oYkfTmevUOFv5jQSzD8AAsg54XPkrfhmMenwSGYR8l4WK+iNbm agxjWuuPT65Agu7C4gpMxnlVR0lihrkrJW8YzTAyahHuJTE96xARK5ffIZwlMoYTiX3u vMfUjlETszVn4HppON57qTqDmnl9rN6euz49Zz/hP9SNenNBh71+RkB6pN+jsXQWzXfB XeJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wGhtDIpDHIRLrTJ2witXc672TBgfiJDb2jx4BcS6kwI=; b=GZhNgn6bXeSLFAMqdQ9Ael8VOtkdw1AI4P07vci0YsPflbMfljPNBMxIjKjelOWYtm 0TSDdnnpYlsNnalB8EgWGQdYFIi1dCcLU+SfjFSXEcrAm/Q4MJyQxO/m0BaLsEPcXUAB +F8E9uw8Ob9x0nMMqaYH/wkR/NRzzV5MRuRryrlRVWz5g6TXz4wunxEM7EJ2vEjzQkNN ivs7EI3VLFVqbrcfEL5DsvcxWF+FhUBkO0WZm2Jv+Q7IAK59VP8FzXVVxPkVhSHFneIe UoDq6hwHEtoyXG00c5pc3G1+Fw5LVh5EV9r0DoNFUZexn5mefu8MwnK3MwoAfEi7HJ22 rvaw== X-Gm-Message-State: AOAM532LfUccP6GQ8iEh7Eedsa4GONrGrpecLuOXSqdudeBJ0m8itkDO rWCl1qJPtYgImzoIJmlf9+k8oEt8gmQ= X-Received: by 2002:ac8:67d5:: with SMTP id r21mr8890210qtp.92.1625413263716; Sun, 04 Jul 2021 08:41:03 -0700 (PDT) Received: from localhost.localdomain (c-73-149-98-40.hsd1.ma.comcast.net. [73.149.98.40]) by smtp.gmail.com with ESMTPSA id s13sm4215304qkm.87.2021.07.04.08.41.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 08:41:03 -0700 (PDT) From: Andriy Gelman X-Google-Original-From: Andriy Gelman To: ffmpeg-devel@ffmpeg.org Date: Sun, 4 Jul 2021 11:40:27 -0400 Message-Id: <20210704154027.13380-3-andriy.gelman@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210704154027.13380-1-andriy.gelman@gmail.com> References: <20210704154027.13380-1-andriy.gelman@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 3/3] avformat/rtsp: Include rtcp in port range check 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: Andriy Gelman Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: anMkx5Ml5a8X From: Andriy Gelman Currently it is only checked that the rtp port does not exceed rtp_port_max. Signed-off-by: Andriy Gelman --- libavformat/rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index bedb75c7bd..a3026f8b73 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1500,7 +1500,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, } /* first try in specified port range */ - while (j <= rt->rtp_port_max) { + while (j + 1 <= rt->rtp_port_max) { AVDictionary *opts = map_to_opts(rt); ff_url_join(buf, sizeof(buf), "rtp", NULL, host, -1,