From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTP id 3BD6E403BA
	for <ffmpegdev@gitmailbox.com>; Wed, 23 Mar 2022 12:22:59 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2DC0468B06F;
	Wed, 23 Mar 2022 14:22:57 +0200 (EET)
Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0ABD368020F
 for <ffmpeg-devel@ffmpeg.org>; Wed, 23 Mar 2022 14:22:49 +0200 (EET)
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 0A33220000D
 for <ffmpeg-devel@ffmpeg.org>; Wed, 23 Mar 2022 12:22:47 +0000 (UTC)
Date: Wed, 23 Mar 2022 13:22:47 +0100
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Message-ID: <20220323122247.GS2829255@pb2>
References: <20220322191100.3071-1-jamrial@gmail.com>
MIME-Version: 1.0
In-Reply-To: <20220322191100.3071-1-jamrial@gmail.com>
Subject: Re: [FFmpeg-devel] [PATCH 1/2] avcodec/av1: only set the private
 context pix_fmt field if get_pixel_format() succeeds
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Content-Type: multipart/mixed; boundary="===============2568244403806803892=="
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/20220323122247.GS2829255@pb2/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>


--===============2568244403806803892==
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature"; boundary="wHN/osVXRAXX1q4W"
Content-Disposition: inline


--wHN/osVXRAXX1q4W
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Mar 22, 2022 at 04:10:59PM -0300, James Almer wrote:
> Otherwise get_pixel_format() will not be called when parsing a subsequent=
 Sequence
> Header in non hwaccel enabled scenarios, allowing frame parsing when it s=
houldn't.
>=20
> This prevents the scenario seqhdr -> frame_hdr/redundant_frame_hdr -> seq=
hdr ->
> redundant_frame_hdr from having the latter redundant frame header parsed =
as if it
> was a frame header by the decoder because the former was discarded.
> Since CBS did not discard it, the latter redundant frame header is output=
 with a
> zeroed AV1RawFrameHeader struct, which can have undesired results, like d=
ivision
> by zero with fields normally guaranteed to be anything else.
>=20
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  libavcodec/av1dec.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)

This patchset fixes the 2 issues too

thx

[...]
--=20
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable

--wHN/osVXRAXX1q4W
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYjsREwAKCRBhHseHBAsP
q+0oAKCJDQx49VgpAugng5lHmOaX7fyLegCeJFwn9n15M2ktZUF7cUNRxwKrie4=
=0+RQ
-----END PGP SIGNATURE-----

--wHN/osVXRAXX1q4W--

--===============2568244403806803892==
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".

--===============2568244403806803892==--