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

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 33dd3485ba lavf/format: skip multiple consecutive ID3v2 tags in probe
33dd3485ba is described below

commit 33dd3485ba1970979698d1542aa2374ca35f7163
Author:     Jun Zhao <[email protected]>
AuthorDate: Tue Jan 20 22:27:06 2026 +0800
Commit:     Jun Zhao <[email protected]>
CommitDate: Wed Jan 21 02:37:43 2026 +0000

    lavf/format: skip multiple consecutive ID3v2 tags in probe
    
    Files with multiple consecutive ID3v2 tags were getting low probe
    scores (1) because av_probe_input_format3 only skipped the first tag,
    leaving subsequent tags to be treated as non-audio data.
    
    Fix by looping to skip all consecutive ID3v2 tags before probing.
    
    Signed-off-by: Jun Zhao <[email protected]>
---
 libavformat/format.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavformat/format.c b/libavformat/format.c
index 516925e7e4..83aa980a15 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -172,7 +172,7 @@ const AVInputFormat *av_probe_input_format3(const 
AVProbeData *pd,
     if (!lpd.buf)
         lpd.buf = (unsigned char *) zerobuffer;
 
-    if (lpd.buf_size > 10 && ff_id3v2_match(lpd.buf, ID3v2_DEFAULT_MAGIC)) {
+    while (lpd.buf_size > 10 && ff_id3v2_match(lpd.buf, ID3v2_DEFAULT_MAGIC)) {
         int id3len = ff_id3v2_tag_len(lpd.buf);
         if (lpd.buf_size > id3len + 16) {
             if (lpd.buf_size < 2LL*id3len + 16)
@@ -181,8 +181,11 @@ const AVInputFormat *av_probe_input_format3(const 
AVProbeData *pd,
             lpd.buf_size -= id3len;
         } else if (id3len >= PROBE_BUF_MAX) {
             nodat = ID3_GREATER_MAX_PROBE;
-        } else
+            break;
+        } else {
             nodat = ID3_GREATER_PROBE;
+            break;
+        }
     }
 
     while ((fmt1 = av_demuxer_iterate(&i))) {

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

Reply via email to