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 CD254409A1 for ; Wed, 2 Feb 2022 00:36:20 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 53CD868B2E8; Wed, 2 Feb 2022 02:36:19 +0200 (EET) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 58BA168B2BA for ; Wed, 2 Feb 2022 02:36:13 +0200 (EET) Received: by mail-wm1-f50.google.com with SMTP id o1-20020a1c4d01000000b0034d95625e1fso3316965wmh.4 for ; Tue, 01 Feb 2022 16:36:13 -0800 (PST) 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; bh=/4mXxWmldMOQoSSa8T5eCPFoOQLPnapKHmhVoGqcwj0=; b=j1iykoUTXJt59CKTk7lXdDfFlcPP23wcGQabW7kpEQSS/WBDobGfLPGC22mj++Tall rDUvBV68Nk+Y6U7LlVAbGTsWBLmo1Z2Abj0oGFWpaNyEnwqAgQSDfUykGw7P/E4btN7z hlq222JXvuoQ5YZXXd/43ddlwpPyi9df4P2NFsml90pYK2h6G6MDPpifaqX2/NjAvLzy x2I29Rh/wDfXeUSeFz//aq4B0Xr2DGioU7ppEPtW4KDosvgr7G1TFHte9Kd5neXtL6sn TQJs3Nwh1IOaKZbOYi9QvKnRD77QrVoNEXnhXopnqInibzci9mGrjCOeP8Gx+kv7TqJP ZVsg== 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; bh=/4mXxWmldMOQoSSa8T5eCPFoOQLPnapKHmhVoGqcwj0=; b=6fL0ivUTaek2/9L3Lz3fOQiQBzWegKkeT2wX6aYOee0+BkPCT7mW1IO2X47W0VRVRn RmFnS1y5ZP83pTEHlty+S5VT1d5XlbMEUkcmy0olkrgoQ6dT2bQxv+/yY8uSqnFVNQd9 oXmW7O3Eje5TzmLQ9V/EpqLzrJkkkYOSm+b3NV4BFEj6mFZ4Rmq6h+8wbLrT3HtWfES5 4YTraTN2c0hY2p19dXErhIe0ujQbKlKoSUBWXrD6wsuayrCXJCMkiKTeUozBQ2kaX1TS jlTlBuYxAyFF0xYWzySiRFcApN8mTGUJXgQ0QuRT3NW8SQVh3fo/GszUJkWmjxvLtB+/ 4NdA== X-Gm-Message-State: AOAM531POi+wOKBIyCymgY2mYT/OpmTCEqnKkdXYdG46I52PoQYvxswS kB4MMOpARh8I1ed4Wv1ggYBSAJgMQAhVnw0DamlGoznhHI8= X-Google-Smtp-Source: ABdhPJwkbc1kScMA89jQPRLLwIQjP1dgKNujRo7BYJrK7A6ZZDj5UOw2n5fMCypm3ELAus81qxpF1JUjh0ogm6i6i1A= X-Received: by 2002:a05:600c:5014:: with SMTP id n20mr3919927wmr.46.1643762172498; Tue, 01 Feb 2022 16:36:12 -0800 (PST) MIME-Version: 1.0 References: <20220201215830.65635-1-markg85@gmail.com> <20220201215830.65635-2-markg85@gmail.com> <65259fb0-1c02-2d1d-ca8c-ed55801f5181@rothenpieler.org> In-Reply-To: From: Mark Gaiser Date: Wed, 2 Feb 2022 01:34:55 +0100 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support. 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 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, Feb 2, 2022 at 1:33 AM Mark Gaiser wrote: > On Wed, Feb 2, 2022 at 1:27 AM Timo Rothenpieler > wrote: > >> On 01.02.2022 22:58, Mark Gaiser wrote: >> > +static int translate_ipfs_to_http(URLContext *h, const char *uri, int >> flags, AVDictionary **options) >> > +{ >> > + const char *ipfs_cid; >> > + const char *protocol_path_suffix = "ipfs/"; >> > + char *fulluri; >> > + int ret; >> > + Context *c = h->priv_data; >> > + int is_ipfs = (av_strstart(uri, "ipfs://", &ipfs_cid) || >> av_strstart(uri, "ipfs:", &ipfs_cid)); >> > + int is_ipns = (av_strstart(uri, "ipns://", &ipfs_cid) || >> av_strstart(uri, "ipns:", &ipfs_cid)); >> >> What's the point of this logic? >> The first half of each check seems pointless, since the second half is >> true for everything the first one would cover. >> > > Hi Time, > oops. Timo obviously. Sorry for the typo in your name. > > The point it to allow > ipfs:// and ipfs: > > So for that i want to test for all possible true situations (ipfs://, > ipfs:, ipns:// and ipns:). > > This is akin to other protocols who seem to do the same check. Look at > crypto.c for example. > Another point is further down where the url is composed. > If it's ipfs it becomes a url like /ipfs > And for ipns: /ipns > > >> >> _______________________________________________ >> 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".