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 ESMTPS id A69D94C2E6 for ; Thu, 6 Feb 2025 15:08:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C8BFF68BBE5; Thu, 6 Feb 2025 17:07:59 +0200 (EET) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 370FE68A67E for ; Thu, 6 Feb 2025 17:07:53 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 8240744420 for ; Thu, 6 Feb 2025 15:07:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1738854472; 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=fC/z8eKTJLpbzQUwNoEGdtzcbKDKoaVKiNzswgOsDVQ=; b=jdcv/Ca7sBga65Rn0A23L98STn//JQxgZzMAwdUB9PZBfIkmf2CeeVp047+tJRyNhSli7X SVVvmMk+VNPw9SXevzhR4SA/dGLX7b5WOJ6E0237dAEnEYBcV5iVNJT7EmA6PbaqRF/PkM 2NmR4f1frCQ3jIzfokyVYBFcZ2F1m4hk4tLTLZq738IE0VUhpalxZkS+MSb5J0VjqDc4B+ kjPlMAGrELersFq25mIM+c7gyCu8413pnfcV9luerVnEE57bFk5t6UaKNLFtCBw98g/JEw GvTSIAwoeS7wVfySxnKJrr7t95UEPrN8IoHe7zuo9fd5KadwhsgKA0ZesiO4LQ== Date: Thu, 6 Feb 2025 16:07:51 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250206150751.GP4991@pb2> References: <1d49ecd046da86394024e1c3407e8ffd88ef23d7.camel@haerdin.se> MIME-Version: 1.0 In-Reply-To: <1d49ecd046da86394024e1c3407e8ffd88ef23d7.camel@haerdin.se> X-GND-State: clean X-GND-Score: -90 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvieejudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdluddtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtudenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepieeutdekhfeifedvffelgeeltdfguefhudefiedvfedvudettdegleduheffteelnecuffhomhgrihhnpehsphhothhifhihrdhnvghtnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 3/8] libavformat/flacdec: Export samples md5 as metadata 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="===============0639519522126404401==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0639519522126404401== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ZwyaKTnHfIQprD7L" Content-Disposition: inline --ZwyaKTnHfIQprD7L Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Tomas On Wed, Feb 05, 2025 at 03:20:09PM +0100, Tomas H=E4rdin wrote: >=20 > libavformat/flacdec.c | 6 ++++++ > tests/ref/fate/cover-art-aiff-id3v2-remux | 5 +++-- > tests/ref/fate/cover-art-flac-remux | 1 + > tests/ref/fate/id3v2-utf16-bom | 5 +++-- > 4 files changed, 13 insertions(+), 4 deletions(-) > 685b0c4be452dc7138f993a3cbeb85320a045545 0003-libavformat-flacdec-Export= -samples-md5-as-metadata.patch > From e1c4dfa4cc7a574f6fac76c11591547d3cd90ad2 Mon Sep 17 00:00:00 2001 > From: Mattias Wadman > Date: Mon, 11 Oct 2021 15:38:13 +0200 > Subject: [PATCH 3/8] libavformat/flacdec: Export samples md5 as metadata >=20 > Will be used by mal to compare metadat md5 with decoded samples md5. >=20 > Part of fixing https://jira.spotify.net/browse/GOL-681 > --- > libavformat/flacdec.c | 6 ++++++ > tests/ref/fate/cover-art-aiff-id3v2-remux | 5 +++-- > tests/ref/fate/cover-art-flac-remux | 1 + > tests/ref/fate/id3v2-utf16-bom | 5 +++-- > 4 files changed, 13 insertions(+), 4 deletions(-) >=20 > diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c > index 3c317acaee..9f65c25864 100644 > --- a/libavformat/flacdec.c > +++ b/libavformat/flacdec.c > @@ -33,6 +33,7 @@ > #include "replaygain.h" > =20 > #define SEEKPOINT_SIZE 18 > +#define MD5_BYTE_SIZE 16 > =20 > typedef struct FLACDecContext { > FFRawDemuxerContext rawctx; > @@ -109,6 +110,7 @@ static int flac_read_header(AVFormatContext *s) > if (metadata_type =3D=3D FLAC_METADATA_TYPE_STREAMINFO) { > uint32_t samplerate; > uint64_t samples; > + char md5hex[MD5_BYTE_SIZE*2+1]; // hex representation plus n= ull terminator > =20 > /* STREAMINFO can only occur once */ > if (found_streaminfo) { > @@ -133,6 +135,10 @@ static int flac_read_header(AVFormatContext *s) > if (samples > 0) > st->duration =3D samples; > } > + > + ff_data_to_hex(md5hex, st->codecpar->extradata+18, MD5_BYTE_= SIZE, 1 /* lowercase */); > + md5hex[sizeof(md5hex)-1] =3D '\0'; > + av_dict_set(&s->metadata, "samples_md5", md5hex, 0); I think "samples_md5" should be documented, so that other decoders can use the same i also see a verify_md5() in hevc and crc seems frequently used in decoders just mentioning so this all can be kept consistant thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Give a rich man 100$ and he will turn it into 1000$. Give a poor man 1000$ and he will spend it. --ZwyaKTnHfIQprD7L Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZ6TQRwAKCRBhHseHBAsP q4xlAJ4/J/dLleh8lD0E2ICVzdx6sPPenQCfZ1ElhT/OKyN45JL0DBHZIMIgDYw= =XhOS -----END PGP SIGNATURE----- --ZwyaKTnHfIQprD7L-- --===============0639519522126404401== 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". --===============0639519522126404401==--