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 256584024E for ; Thu, 21 Apr 2022 10:52:31 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1F74B68B3BA; Thu, 21 Apr 2022 13:52:29 +0300 (EEST) Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0704568B379 for ; Thu, 21 Apr 2022 13:52:23 +0300 (EEST) Received: by mail-yb1-f182.google.com with SMTP id f38so8040660ybi.3 for ; Thu, 21 Apr 2022 03:52:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GfvS7L5QJ16qwhzpFg4B+YFAPmyFcapizvd/XgvVmrY=; b=plfz5nIOX1GeheyIhAlxuJTcyTOvc2buqcq4fPRFUCqdkVlX+5klX/HtjAIwKHh6zO RicgDCc3rZgAErVCIz3HrDlrwMnPr1jHDFmMZ3/MgT1FUEibGu/CV76IYifLv2Hgj08y +4kVq1YPG6Vd+tbkCdLHIQ8CNh+bP0YH19GTjyqJkYJ/7IZ1NSZVFPkF/kLNt0SUWB+W kKnRicJrTlirR3QU4fXU66Wzy7KKhNejYHTig0KojcEy7vLtJlVRPa2X/Cha8StVkXnm QRbYMmgx1enG0PsB04CLalmja2vWnQMBT8FJvOML9PS4UgO888Rjcjr6EEjOaRBTQdku +rHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GfvS7L5QJ16qwhzpFg4B+YFAPmyFcapizvd/XgvVmrY=; b=ojEBs4qgfXwCMrfgsofxYcm6h+pnh6SGQDsww6SPlBAs46FwmDWaLR52qA60nu25Vi aIJcMp6manxH0u5ccEoopModDLD6JgjuvdjRUxh0Te2DdpA+Fh/TXO1UttZyqg0n4flQ A2/H8PMzLtWxBSQZFx086ENcF8C1/xeqBH7CmbDXQqL3U1zVlGgxQlLxJhkesoQnJC0H fSEI/SKL/TFwHHoEcDYLGUoGnPQHla8RdmeEN3A76BH5tVNLkXmtadwW/E4r6vqF/wMF nPYsfCsCqS91oixguEpfkYbVSgA+3FwS+6UiA+olOkpow/NGtLXphAmoTSaTzxs/870E eefw== X-Gm-Message-State: AOAM531h0JNzLAOuwHVQJuzw3DyQS/RYWaO8W4rxnAVWtlovp23K3UWm wZwGwxDFTYm32fZEUxkwl/ek34RuKw7SqzGO1QKPJ9mK X-Google-Smtp-Source: ABdhPJzmiienK1xQBlyOn5TLclM09CF3uDNWxxhu5k2sXx+QFc18SDK2E8G5cOZT/kAR85S7Jm3n9cAMng4MEdK9HbU= X-Received: by 2002:a25:94a:0:b0:615:7cf4:e2cd with SMTP id u10-20020a25094a000000b006157cf4e2cdmr24698071ybm.227.1650538341236; Thu, 21 Apr 2022 03:52:21 -0700 (PDT) MIME-Version: 1.0 References: <20220420203328.67317-1-leo.izen@gmail.com> In-Reply-To: <20220420203328.67317-1-leo.izen@gmail.com> From: Paul B Mahol Date: Thu, 21 Apr 2022 12:54:45 +0200 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH] avformat/avio: use av_match_name to match protocol lists 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: Leo Izen 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: On Wed, Apr 20, 2022 at 10:34 PM Leo Izen wrote: > This swaps av_match_list to av_match_name inside ffurl_connect, > which allows ALL to be treated as a valid value on the whitelist > or blacklist in accordance with the behavior described in the > documentation. > --- > libavformat/avio.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavformat/avio.c b/libavformat/avio.c > index 4846bbd8c6..d252bec2f3 100644 > --- a/libavformat/avio.c > +++ b/libavformat/avio.c > @@ -178,12 +178,12 @@ int ffurl_connect(URLContext *uc, AVDictionary > **options) > av_assert0(!(e=av_dict_get(*options, "protocol_blacklist", NULL, 0)) > || > (uc->protocol_blacklist && !strcmp(uc->protocol_blacklist, > e->value))); > > - if (uc->protocol_whitelist && av_match_list(uc->prot->name, > uc->protocol_whitelist, ',') <= 0) { > + if (uc->protocol_whitelist && av_match_name(uc->prot->name, > uc->protocol_whitelist) <= 0) { > av_log(uc, AV_LOG_ERROR, "Protocol '%s' not on whitelist > '%s'!\n", uc->prot->name, uc->protocol_whitelist); > return AVERROR(EINVAL); > } > > - if (uc->protocol_blacklist && av_match_list(uc->prot->name, > uc->protocol_blacklist, ',') > 0) { > + if (uc->protocol_blacklist && av_match_name(uc->prot->name, > uc->protocol_blacklist) > 0) { > av_log(uc, AV_LOG_ERROR, "Protocol '%s' on blacklist '%s'!\n", > uc->prot->name, uc->protocol_blacklist); > return AVERROR(EINVAL); > } > So this still works if multiple items are provided ? -- > 2.36.0 > > _______________________________________________ > 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". > _______________________________________________ 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".