[FFmpeg-cvslog] avformat/mpegts: adjust probe score for low check_count

Michael Niedermayer git at videolan.org
Sat Aug 13 16:30:01 EEST 2016


ffmpeg | branch: release/3.0 | Michael Niedermayer <michael at niedermayer.cc> | Tue Jun 14 01:36:15 2016 +0200| [4e5d1c45f111966f37176757d4e75c9ec9fe4aac] | committer: Michael Niedermayer

avformat/mpegts: adjust probe score for low check_count

Fixes mis-detection of tiff as mpegts
Fixes Ticket5565

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 00c4861f13d9ec302348cfa1e2d4f1c796e9e86b)

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4e5d1c45f111966f37176757d4e75c9ec9fe4aac
---

 libavformat/mpegts.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 7a2f942..e8f3889 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -2462,8 +2462,10 @@ static int mpegts_probe(AVProbeData *p)
 
     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;
+    } else if (check_count >= CHECK_COUNT && sumscore > 6) {
+        return AVPROBE_SCORE_MAX/2 + sumscore - CHECK_COUNT;
     } else if (check_count >= CHECK_COUNT && maxscore > 6) {
         return AVPROBE_SCORE_MAX/2 + sumscore - CHECK_COUNT;
     } else if (sumscore > 6) {



More information about the ffmpeg-cvslog mailing list