1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

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>
This commit is contained in:
Michael Niedermayer
2016-06-14 01:36:15 +02:00
parent 9da27fb579
commit 00c4861f13

View File

@@ -2508,8 +2508,10 @@ static int mpegts_probe(AVProbeData *p)
ff_dlog(0, "TS score: %d %d\n", sumscore, maxscore); ff_dlog(0, "TS score: %d %d\n", sumscore, maxscore);
if (check_count >= CHECK_COUNT && sumscore > 6) { if (check_count > CHECK_COUNT && sumscore > 6) {
return AVPROBE_SCORE_MAX + sumscore - CHECK_COUNT; return AVPROBE_SCORE_MAX + sumscore - CHECK_COUNT;
} else if (check_count >= CHECK_COUNT && sumscore > 6) {
return AVPROBE_SCORE_MAX/2 + sumscore - CHECK_COUNT;
} else if (check_count >= CHECK_COUNT && maxscore > 6) { } else if (check_count >= CHECK_COUNT && maxscore > 6) {
return AVPROBE_SCORE_MAX/2 + sumscore - CHECK_COUNT; return AVPROBE_SCORE_MAX/2 + sumscore - CHECK_COUNT;
} else if (sumscore > 6) { } else if (sumscore > 6) {