Browse code

avformat/mpegts: adjust probe score for low check_count

Fixes mis-detection of tiff as mpegts
Fixes Ticket5565

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

Michael Niedermayer authored on 2016/06/14 08:36:15
Showing 1 changed files
... ...
@@ -2508,8 +2508,10 @@ static int mpegts_probe(AVProbeData *p)
2508 2508
 
2509 2509
     ff_dlog(0, "TS score: %d %d\n", sumscore, maxscore);
2510 2510
 
2511
-    if        (check_count >= CHECK_COUNT && sumscore > 6) {
2511
+    if        (check_count > CHECK_COUNT && sumscore > 6) {
2512 2512
         return AVPROBE_SCORE_MAX   + sumscore - CHECK_COUNT;
2513
+    } else if (check_count >= CHECK_COUNT && sumscore > 6) {
2514
+        return AVPROBE_SCORE_MAX/2 + sumscore - CHECK_COUNT;
2513 2515
     } else if (check_count >= CHECK_COUNT && maxscore > 6) {
2514 2516
         return AVPROBE_SCORE_MAX/2 + sumscore - CHECK_COUNT;
2515 2517
     } else if (sumscore > 6) {