From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 883904CF3A for ; Tue, 12 Aug 2025 09:55:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 6EF3568CA1E; Tue, 12 Aug 2025 12:55:14 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 68CBA68AFBE for ; Tue, 12 Aug 2025 12:55:08 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id C51F843195 for ; Tue, 12 Aug 2025 09:55:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1754992507; 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=bUIByGRZCxjZFu5T56MzDk8HjI2Adg7aFH7Ip577IhM=; b=BV0exqBXX/flKoK1vuvi6s4D/ikhuCmW2OibUunJfnex2CoBO1hTdKbYaOodyj8wDuvbH9 zBj+Mjexcv+38+FI6x60hRYJW62B/uCdQfYfu/Kc51VY3YodpbdaniK8WZlcff+xkTayQP EsNkBn8wTTiKqGqY1vcRc/UVnGrBhr1nyxeQLdErLkc3Xq4ZcAmoLpngJioTvAdpw9eDxU Pi2dRI5xzc6Jh4cIE7PqjegRKr4dqmUpQc1uoDWVeQTxYq/5+z5rtW5c7SfGD3Dy1N/6y7 jAjF1Knhh5JZtTtpsNYP4ciBHwNXTFmXtwy/t92KyIzdaPvihWhLM83a9VoH+g== Date: Tue, 12 Aug 2025 11:55:06 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250812095506.GG29660@pb2> References: <20250806220524.GY29660@pb2> MIME-Version: 1.0 In-Reply-To: X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddufeehtddvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttdejnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeelkeeggfffiedufeejueffjeduhedttdduledtheevveevtdeiueelhfdtuedtkeenucfkphepgedurdeiiedrieehrddujeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieehrddujeeipdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [h264] Make ff_h264_build_ref_list stricter with AV_EF_EXPLODE 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="===============0678586297531438228==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0678586297531438228== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TYLiWwlaKINNymeI" Content-Disposition: inline --TYLiWwlaKINNymeI Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 07, 2025 at 02:20:11PM -0700, Dale Curtis wrote: > On Wed, Aug 6, 2025 at 3:05=E2=80=AFPM Michael Niedermayer [...] >=20 > > > > > > > > > > Signed-off-by: Dale Curtis > > > --- > > > libavcodec/h264_refs.c | 7 +++++++ > > > 1 file changed, 7 insertions(+) > > > > > > diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c > > > index 74840e5909..e6e3adf502 100644 > > > --- a/libavcodec/h264_refs.c > > > +++ b/libavcodec/h264_refs.c > > > @@ -370,6 +370,9 @@ int ff_h264_build_ref_list(H264Context *h, > > H264SliceContext *sl) > > > i < 0 ? "reference picture missing during > > reorder\n" : > > > "mismatching reference\n" > > > ); > > > + if (h->avctx->err_recognition & AV_EF_EXPLODE) { > > > + return AVERROR_INVALIDDATA; > > > + } > > > > indention depth is 4 in ffmpeg consistently > > >=20 > Done. >=20 >=20 > > > > > > > memset(&sl->ref_list[list][index], 0, > > sizeof(sl->ref_list[0][0])); // FIXME > > > } else { > > > for (i =3D index; i + 1 < sl->ref_count[list]; i++) { > > > @@ -392,6 +395,10 @@ int ff_h264_build_ref_list(H264Context *h, > > H264SliceContext *sl) > > > for (int index =3D 0; index < sl->ref_count[list]; index++) { > > > if ( !sl->ref_list[list][index].parent > > > || (!FIELD_PICTURE(h) && > > (sl->ref_list[list][index].reference&3) !=3D 3)) { > > > + if (h->avctx->err_recognition & AV_EF_EXPLODE) { > > > + av_log(h->avctx, AV_LOG_ERROR, "Missing reference > > picture\n"); > > > + return AVERROR_INVALIDDATA; > > > + } > > > av_log(h->avctx, AV_LOG_ERROR, "Missing reference > > picture, default is %d\n", h->default_ref[list].poc); > > > > the error out can be after this av_log() avoiding the 2nd av_log() in t= he > > if() > > >=20 > I didn't make this change, but can if you prefer. The existing log implies > a default is set, but the new log simply indicates the reference picture > missing is a fatal error. ok, i will apply this with a commit message not refering to ff_put_h264_chroma_mc4_ssse3() AV_EF_EXPLODE is not a fix for a issue with MC thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Opposition brings concord. Out of discord comes the fairest harmony. -- Heraclitus --TYLiWwlaKINNymeI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaJsPdgAKCRBhHseHBAsP q9EbAKCTGPCvLw5B/cadwKJ6g+VbMaEPmgCfdLuusW4Vdm2nZCVpbgxsfKvtf08= =OBlE -----END PGP SIGNATURE----- --TYLiWwlaKINNymeI-- --===============0678586297531438228== 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". --===============0678586297531438228==--