Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 3/8] libavformat/flacdec: Export samples md5 as metadata
Date: Wed, 12 Feb 2025 22:55:00 +0100
Message-ID: <20250212215500.GT4991@pb2> (raw)
In-Reply-To: <eeffe0c4ae98dafd69c1f4fa3a3d66aeb173df1e.camel@haerdin.se>


[-- Attachment #1.1: Type: text/plain, Size: 2065 bytes --]

Hi
On Wed, Feb 12, 2025 at 11:56:16AM +0100, Tomas Härdin wrote:
> tor 2025-02-06 klockan 16:07 +0100 skrev Michael Niedermayer:
> > Hi Tomas
> > 
> > On Wed, Feb 05, 2025 at 03:20:09PM +0100, Tomas Härdin wrote:
[...]
> > > 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"
> > >  
> > >  #define SEEKPOINT_SIZE 18
> > > +#define MD5_BYTE_SIZE 16
> > >  
> > >  typedef struct FLACDecContext {
> > >      FFRawDemuxerContext rawctx;
> > > @@ -109,6 +110,7 @@ static int flac_read_header(AVFormatContext *s)
> > >          if (metadata_type == FLAC_METADATA_TYPE_STREAMINFO) {
> > >              uint32_t samplerate;
> > >              uint64_t samples;
> > > +            char md5hex[MD5_BYTE_SIZE*2+1]; // hex representation
> > > plus null terminator
> > >  
> > >              /* STREAMINFO can only occur once */
> > >              if (found_streaminfo) {
> > > @@ -133,6 +135,10 @@ static int flac_read_header(AVFormatContext
> > > *s)
> > >                  if (samples > 0)
> > >                      st->duration = samples;
> > >              }
> > > +
> > > +            ff_data_to_hex(md5hex, st->codecpar->extradata+18,
> > > MD5_BYTE_SIZE, 1 /* lowercase */);
> > > +            md5hex[sizeof(md5hex)-1] = '\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
> 
> Documented where? doc/metadata.texi doesn't seem like the place for it.
> doc/demuxers.texi maybe?

honestly, i didnt think about "where", just that it should be documented
somewhere

thx

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

Those who are best at talking, realize last or never when they are wrong.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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".

  reply	other threads:[~2025-02-12 21:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 14:18 [FFmpeg-devel] [PATCH 1/8] avformat/http: Return EIO for prematurely broken connection Tomas Härdin
2025-02-05 14:19 ` [FFmpeg-devel] [PATCH 2/8] libavcodec/wmadec: Return AVERROR_INVALIDDATA on decoding errors Tomas Härdin
2025-02-05 16:28   ` Marth64
2025-02-05 14:20 ` [FFmpeg-devel] [PATCH 3/8] libavformat/flacdec: Export samples md5 as metadata Tomas Härdin
2025-02-06 15:07   ` Michael Niedermayer
2025-02-12 10:56     ` Tomas Härdin
2025-02-12 21:55       ` Michael Niedermayer [this message]
2025-02-12 11:14   ` Andreas Rheinhardt
2025-02-12 11:27     ` Tomas Härdin
2025-02-12 12:27       ` Andreas Rheinhardt
2025-02-12 13:32         ` Tomas Härdin
2025-02-05 14:20 ` [FFmpeg-devel] [PATCH 4/8] avformat/flacdec: Return correct error-codes on read-failure Tomas Härdin
2025-02-06 15:01   ` Michael Niedermayer
2025-02-05 14:21 ` [FFmpeg-devel] [PATCH 5/8] rtmp: Set correct message stream id when writing as server Tomas Härdin
2025-02-05 14:22 ` [FFmpeg-devel] [PATCH 6/8] GOL-1361: Remove invalid CTTS sample_offset check Tomas Härdin
2025-02-12 11:11   ` Tomas Härdin
2025-02-05 14:23 ` [FFmpeg-devel] [PATCH 7/8] avformat/mp3dec: Subtract known padding from duration Tomas Härdin
2025-02-05 14:24 ` [FFmpeg-devel] [PATCH 8/8] Make mime-type award a bonus probe score Tomas Härdin
2025-02-06 14:58   ` Michael Niedermayer
2025-02-12 11:03     ` Tomas Härdin
2025-02-12 22:03       ` Michael Niedermayer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250212215500.GT4991@pb2 \
    --to=michael@niedermayer.cc \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git