This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 910d796430ddb9f823aa5aa95cada20120b98f93
Author:     Romain Beauxis <[email protected]>
AuthorDate: Wed Apr 29 14:19:11 2026 -0500
Commit:     Romain Beauxis <[email protected]>
CommitDate: Thu May 7 09:46:17 2026 -0500

    libavformat/id3v2: wire FF_FDEBUG_ID3V2 frame debugging
    
    Signed-off-by: Romain Beauxis <[email protected]>
---
 libavformat/avformat.h |  1 +
 libavformat/id3v2.c    | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 4bc4ada940..9673a4baf5 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1539,6 +1539,7 @@ typedef struct AVFormatContext {
      */
     int debug;
 #define FF_FDEBUG_TS        0x0001
+#define FF_FDEBUG_ID3V2     0x0002
 
     /**
      * The maximum number of streams.
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 4942b1ffca..44cad17d8b 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -1055,6 +1055,24 @@ static void id3v2_parse(AVIOContext *pb, AVDictionary 
**metadata,
                     pbx = &pb_local.pub; // read from sync buffer
                 }
 #endif
+            if (s && (s->debug & FF_FDEBUG_ID3V2)) {
+                int64_t pos = avio_tell(pbx);
+                uint8_t *buf = av_malloc(tlen);
+                if (buf) {
+                    AVBPrint bp;
+                    int n = avio_read(pbx, buf, tlen);
+                    av_bprint_init(&bp, 0, AV_BPRINT_SIZE_UNLIMITED);
+                    av_bprintf(&bp, "|");
+                    for (int i = 0; i < n; i++)
+                        av_bprintf(&bp, "%c", buf[i] >= 0x20 && buf[i] < 0x7f 
? buf[i] : '.');
+                    av_bprintf(&bp, "|");
+                    av_log(NULL, AV_LOG_INFO, "ID3v2 frame %.4s (%d 
bytes):%s\n",
+                           tag, tlen, bp.str);
+                    av_bprint_finalize(&bp, NULL);
+                    av_free(buf);
+                    avio_seek(pbx, pos, SEEK_SET);
+                }
+            }
             if (tag[0] == 'T')
                 /* parse text tag */
                 read_ttag(s, pbx, tlen, metadata, tag);

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to