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 AD76949144 for ; Mon, 8 Jul 2024 21:02:02 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DBF8468D8E9; Tue, 9 Jul 2024 00:01:59 +0300 (EEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 223BF68D45D for ; Tue, 9 Jul 2024 00:01:53 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 302ABFF806 for ; Mon, 8 Jul 2024 21:01:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720472512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pnI5PyxL/SrzKbrHa7QGEt3hmZKh0D9AULW2YibWhGo=; b=MpEf9tcbmEWru7dByirILGYiVZu6bHCZ63TRV+ly7VkvFTpFUtx1r7ptYxfG+PGr0CVrK6 LHpCux6SkLqP2zcIuk3r4NzyUM3dTFZEOy3tDEBCS/uVO8WqrXx+DSa3K2mYPCKnKO0j3n 8fu65wxTzELWyfDCTbNcq2gTk2RqfKegih8paEh+iiGyiUsCCymsxaC3JosJlDp7CA6Gho Hw9XvLth91zt2QP4pWqb2ssf1aeKymAwI8XCessyRdaC94kcpPKYZfqmuGapB9Vk6XwLJh 6RkHLndolpaHKnJCJPsJFD5clSUyS0YmW/nX+wQYTyf1OfKsC39OFEhRmNmenA== Date: Mon, 8 Jul 2024 23:01:51 +0200 From: Michael Niedermayer To: ffmpeg-devel@ffmpeg.org Message-ID: <20240708210151.GJ1904408@pb2> References: <20240503122653.DDEB9412652@natalya.videolan.org> MIME-Version: 1.0 In-Reply-To: <20240503122653.DDEB9412652@natalya.videolan.org> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] avfilter/vf_scale: add optional "ref" input 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="===============4532491405733087173==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4532491405733087173== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jB+02Y6wHc2pEa2x" Content-Disposition: inline --jB+02Y6wHc2pEa2x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi On Fri, May 03, 2024 at 12:26:52PM +0000, Niklas Haas wrote: > ffmpeg | branch: master | Niklas Haas | Wed Apr 24 12:03:= 00 2024 +0200| [bb8044581366fe286e16b14515d873979133dbda] | committer: Nikl= as Haas >=20 > avfilter/vf_scale: add optional "ref" input >=20 > This is automatically enabled if the width/height expressions reference > any ref_* variable. This will ultimately serve as a more principled > replacement for the fundamentally broken scale2ref. >=20 > See-Also: https://trac.ffmpeg.org/ticket/10795 >=20 > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=3Dcommit;h=3Dbb8044581= 366fe286e16b14515d873979133dbda [...] > ret =3D scale_frame(ctx->inputs[0], in, &out); > if (out) { > @@ -933,6 +1053,9 @@ static int do_scale(FFFrameSync *fs) > return ff_filter_frame(outlink, out); > } > =20 > +err: > + if (ret < 0) > + av_frame_free(&in); double free this can be already freed in out =3D ff_get_video_buffer(outlink, outlink->w, outlink->h); if (!out) { av_frame_free(&in); return AVERROR(ENOMEM); } Also the interaction of these functions is a bit complex (which is why iam not proposing a fix but rather point this out also as you are working on the scale code ...) Found by coverity: CID1596782 Double free thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 2 "100% positive feedback" - "All either got their money back or didnt compla= in" "Best seller ever, very honest" - "Seller refunded buyer after failed scam" --jB+02Y6wHc2pEa2x Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZoxTuwAKCRBhHseHBAsP q0i9AJ4px9lVHNXjCzQ6Q3WhdxKPGAE/5ACePauWpo2VpN0aEyT8ZpQ772eQOCs= =i6CP -----END PGP SIGNATURE----- --jB+02Y6wHc2pEa2x-- --===============4532491405733087173== 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". --===============4532491405733087173==--