aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-04-14 00:03:30 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-01 13:33:44 +0200
commitdeabf2bdad17950dafda8bace82b1def2b5d8e0c (patch)
tree65f49b14396eb5f4a4cdf90c88e2f72a51299c73
parentad27c7c85044efe07f8d45b9de33a7ef9d5213ae (diff)
downloadffmpeg-deabf2bdad17950dafda8bace82b1def2b5d8e0c.tar.gz
avformat/mpeg: Decrease score by 1 for files with very little valid data
Fixes: 8233/PPY6574574605_cut.mp3 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 20f7b4dfc9640c910655bd153c6996e9edd42ff0) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/mpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 8ae4740920..19b250e060 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -107,7 +107,7 @@ static int mpegps_probe(AVProbeData *p)
if (sys > invalid && sys * 9 <= pspack * 10)
return (audio > 12 || vid > 3 || pspack > 2) ? AVPROBE_SCORE_EXTENSION + 2
- : AVPROBE_SCORE_EXTENSION / 2 + 1; // 1 more than mp3
+ : AVPROBE_SCORE_EXTENSION / 2 + (audio + vid + pspack > 1); // 1 more than mp3
if (pspack > invalid && (priv1 + vid + audio) * 10 >= pspack * 9)
return pspack > 2 ? AVPROBE_SCORE_EXTENSION + 2
: AVPROBE_SCORE_EXTENSION / 2; // 1 more than .mpg