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 4C78741332 for ; Mon, 28 Mar 2022 16:44:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2D57468B248; Mon, 28 Mar 2022 19:44:22 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4A3EB68B233 for ; Mon, 28 Mar 2022 19:44:15 +0300 (EEST) Received: from localhost (213-47-68-29.cable.dynamic.surfer.at [213.47.68.29]) (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 7DF982000D for ; Mon, 28 Mar 2022 16:44:14 +0000 (UTC) Date: Mon, 28 Mar 2022 18:44:13 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220328164413.GH2829255@pb2> References: <20220318145005.241414-1-markg85@gmail.com> <20220318145005.241414-2-markg85@gmail.com> <20220328161900.GG2829255@pb2> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH v9 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: multipart/mixed; boundary="===============5110117625750690796==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5110117625750690796== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sMN9BhKEws+9G1vL" Content-Disposition: inline --sMN9BhKEws+9G1vL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 28, 2022 at 06:34:33PM +0200, Mark Gaiser wrote: > On Mon, Mar 28, 2022 at 6:19 PM Michael Niedermayer > wrote: >=20 > > On Fri, Mar 18, 2022 at 03:50:05PM +0100, Mark Gaiser wrote: > > > This patch adds support for: > > > - ffplay ipfs:// > > > - ffplay ipns:// > > > > > > IPFS data can be played from so called "ipfs gateways". > > > A gateway is essentially a webserver that gives access to the > > > distributed IPFS network. > > > > > > This protocol support (ipfs and ipns) therefore translates > > > ipfs:// and ipns:// to a http:// url. This resulting url is > > > then handled by the http protocol. It could also be https > > > depending on the gateway provided. > > > > > > To use this protocol, a gateway must be provided. > > > If you do nothing it will try to find it in your > > > $HOME/.ipfs/gateway file. The ways to set it manually are: > > > 1. Define a -gateway to the gateway. > > > 2. Define $IPFS_GATEWAY with the full http link to the gateway. > > > 3. Define $IPFS_PATH and point it to the IPFS data path. > > > 4. Have IPFS running in your local user folder (under $HOME/.ipfs). > > > > > > Signed-off-by: Mark Gaiser > > > --- > > > configure | 2 + > > > doc/protocols.texi | 30 ++++ > > > libavformat/Makefile | 2 + > > > libavformat/ipfsgateway.c | 310 ++++++++++++++++++++++++++++++++++++= ++ > > > libavformat/protocols.c | 2 + > > > 5 files changed, 346 insertions(+) > > > create mode 100644 libavformat/ipfsgateway.c > > > > Theres some trailing whitespace which needs to be removed > > our git scripts block trailing whitespace in most files > > > > [...] > > > +static int ipfs_close(URLContext *h) > > > +{ > > > + IPFSGatewayContext *c =3D h->priv_data; > > > + av_free(c->gateway); > > > > this results in a double free > > >=20 > I believe one of the earlier feedback rounds told me to put it here. > It's not free'd anywhere else. =3D=3D22837=3D=3D Invalid free() / delete / delete[] / realloc() =3D=3D22837=3D=3D at 0x4C32D3B: free (in /usr/lib/valgrind/vgpreload_mem= check-amd64-linux.so) =3D=3D22837=3D=3D by 0x117FF88: av_opt_free (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x5C58CF: ffurl_closep (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x5C5AF2: ffurl_close (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x5CA206: avio_close (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x3021C0: ffmpeg_cleanup (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x2F5FA0: exit_program (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x2E34A1: main (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D Address 0x2ced8760 is 0 bytes inside a block of size 17 = free'd =3D=3D22837=3D=3D at 0x4C32D3B: free (in /usr/lib/valgrind/vgpreload_mem= check-amd64-linux.so) =3D=3D22837=3D=3D by 0x7372BD: ipfs_close (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x5C588C: ffurl_closep (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x5C5AF2: ffurl_close (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x5CA206: avio_close (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x3021C0: ffmpeg_cleanup (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x2F5FA0: exit_program (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x2E34A1: main (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D Block was alloc'd at =3D=3D22837=3D=3D at 0x4C31A3F: malloc (in /usr/lib/valgrind/vgpreload_m= emcheck-amd64-linux.so) =3D=3D22837=3D=3D by 0x4C33D84: realloc (in /usr/lib/valgrind/vgpreload_= memcheck-amd64-linux.so) =3D=3D22837=3D=3D by 0x117E120: av_strdup (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x1181DEF: av_opt_set (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x118272D: av_opt_set_dict2 (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x5C598C: ffurl_open_whitelist (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x5CA4DD: ffio_open_whitelist (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x6B88FB: io_open_default (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x5E0E9E: avformat_open_input (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x2EB32B: open_input_file (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x2EF00B: ffmpeg_parse_options (in ffmpeg/ffmpeg_g) =3D=3D22837=3D=3D by 0x2E3301: main (in ffmpeg/ffmpeg_g) >=20 > Then again, in those earlier rounds I was manipulating c-gateway which > right now isn't the case at all anymore. >=20 > If all that's stopping it from merging is this single line, could you > perhaps merge it and remove this line while at it? > I'm kinda reluctant to make another patch and wait 1-2 weeks again... I do not know why its there or who asked for it to be put there. I dont want to just remove something while merging that someone else asked to be added thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Never trust a computer, one day, it may think you are the virus. -- Compn --sMN9BhKEws+9G1vL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYkHl2QAKCRBhHseHBAsP q+6VAKCPpq77NlLZkN+Jn0KBQFvJGLxcvQCfaWVobVVO+4/wKX0+MP5K8PYnI18= =ZQOp -----END PGP SIGNATURE----- --sMN9BhKEws+9G1vL-- --===============5110117625750690796== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============5110117625750690796==--