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 79064459BE for ; Sat, 1 Apr 2023 15:43:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 34CCD68BFEB; Sat, 1 Apr 2023 18:43:09 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DC4C468BF99 for ; Sat, 1 Apr 2023 18:43:02 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 30CFB40002 for ; Sat, 1 Apr 2023 15:43:01 +0000 (UTC) Date: Sat, 1 Apr 2023 17:43:01 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230401154301.GF1164690@pb2> References: <068476d4-1430-27bb-83c4-3a160d022596@mediaarea.net> <09775b73ab48e425f3b557aaa8d5847643ebe9b7.camel@haerdin.se> <0b6c3856-082c-cb33-e07c-3adf0502b93c@mediaarea.net> <20230401143739.GD1164690@pb2> <85c1e58e-cc90-5814-cba5-d91201dec993@mediaarea.net> MIME-Version: 1.0 In-Reply-To: <85c1e58e-cc90-5814-cba5-d91201dec993@mediaarea.net> Subject: Re: [FFmpeg-devel] avformat/mxfenc: SMPTE RDD 48:2018 Amd 1:2022 (FFV1 in MXF) 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="===============3809571820408207903==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3809571820408207903== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GV0iVqYguTV4Q9ER" Content-Disposition: inline --GV0iVqYguTV4Q9ER Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 01, 2023 at 05:20:50PM +0200, Jerome Martinez wrote: > On 01/04/2023 16:37, Michael Niedermayer wrote: > > On Tue, Mar 14, 2023 at 10:52:15AM +0100, Jerome Martinez wrote: > > [...] > > > + > > > + memset(state, 128, sizeof(state)); > > > + if (st->codecpar->extradata) { > > > + ff_init_range_decoder(&c, st->codecpar->extradata, st->codec= par->extradata_size); > > > + ff_build_rac_states(&c, 0.05 * (1LL << 32), 256 - 8); > > > + v =3D get_ffv1_unsigned_symbol(&c, state); > > > + av_assert0(v >=3D 2); > > > + if (v > 4) { > > > + return 0; > > > + } > > > + sc->micro_version =3D get_ffv1_unsigned_symbol(&c, state); > > > + } else { > > > + uint8_t keystate =3D 128; > > > + ff_init_range_decoder(&c, pkt->data, pkt->size); > > > + ff_build_rac_states(&c, 0.05 * (1LL << 32), 256 - 8); > > > + get_rac(&c, &keystate); // keyframe > > > + v =3D get_ffv1_unsigned_symbol(&c, state); > > > + av_assert0(v < 2); > > Are these asserts testing muxer input ? > > if so what ensures that the values are within the asserted range ? >=20 >=20 > My understanding of the code and workflow is that the input is currently > rejected (AV_LOG_ERROR, "invalid version %d in ver01 header\n" and > AV_LOG_ERROR, "Invalid version in global header\n") in ffv1dec.c during t= he > analysis of this input so before this piece of code is reached. > Could be an AV_LOG_ERROR if preferred. if the encoder writes 5 teh muxer crashes here V 5me=3D 0 fps=3D0.0 q=3D-0.0 size=3D 0kB time=3D00:00:00.00 bitra= te=3DN/A speed=3D 0x =20 Assertion v < 2 failed at libavformat/mxfenc.c:2505 [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Never trust a computer, one day, it may think you are the virus. -- Compn --GV0iVqYguTV4Q9ER Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZChQ/gAKCRBhHseHBAsP q5RZAJ4iiC/wSYKpfcHU2L6qelAL1+AiBwCghh5deS+o0/K/wpJry2JRkEGGr/o= =iY16 -----END PGP SIGNATURE----- --GV0iVqYguTV4Q9ER-- --===============3809571820408207903== 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". --===============3809571820408207903==--