[FFmpeg-devel] [PATCH]lavf/format: Do not lower the probe score if an id3v2 tag is smaller than PROBE_BUF_MAX

Carl Eugen Hoyos cehoyos at ag.or.at
Sat Jan 30 13:18:50 CET 2016


Hi!

Attached patch fixes ticket #5205 for me.

An alternative would be to check for score >=1.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/format.c b/libavformat/format.c
index ffddb13..d1a2e36 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -179,13 +179,13 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened,
 
     if (lpd.buf_size > 10 && ff_id3v2_match(lpd.buf, ID3v2_DEFAULT_MAGIC)) {
         int id3len = ff_id3v2_tag_len(lpd.buf);
+        nodat = 1;
         if (lpd.buf_size > id3len + 16) {
             lpd.buf      += id3len;
             lpd.buf_size -= id3len;
         } else if (id3len >= PROBE_BUF_MAX) {
             nodat = 2;
-        } else
-            nodat = 1;
+        }
     }
 
     fmt = NULL;


More information about the ffmpeg-devel mailing list