]> git.sesse.net Git - ffmpeg/commitdiff
avformat/utils: limit probe score in the id3 case only if there is a chance that...
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 12 May 2014 18:41:32 +0000 (20:41 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 12 May 2014 18:45:03 +0000 (20:45 +0200)
Fixes ticket3327 (sample.mp3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c

index 4f5b310d83fb913cb457bd5f943c3a3cd1f9f405..ce5dbdfe0ca9b9c558c7d34f50e661472e78dc7c 100644 (file)
@@ -251,6 +251,8 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened,
         if (lpd.buf_size > id3len + 16) {
             lpd.buf      += id3len;
             lpd.buf_size -= id3len;
+        } else if (id3len >= PROBE_BUF_MAX) {
+            nodat = 2;
         } else
             nodat = 1;
     }
@@ -274,7 +276,7 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened,
         } else if (score == score_max)
             fmt = NULL;
     }
-    if (nodat)
+    if (nodat == 1)
         score_max = FFMIN(AVPROBE_SCORE_EXTENSION / 2 - 1, score_max);
     *score_ret = score_max;