diff mbox series

[FFmpeg-devel] avformat/mpeg: Decrease score by 1 for files with very little valid data

Message ID 20200414001545.24439-1-michael@niedermayer.cc
State Accepted
Commit 20f7b4dfc9640c910655bd153c6996e9edd42ff0
Headers show
Series [FFmpeg-devel] avformat/mpeg: Decrease score by 1 for files with very little valid data | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Michael Niedermayer April 14, 2020, 12:15 a.m. UTC
Fixes: 8233/PPY6574574605_cut.mp3

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/mpeg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer May 9, 2020, 11:08 p.m. UTC | #1
On Tue, Apr 14, 2020 at 02:15:45AM +0200, Michael Niedermayer wrote:
> Fixes: 8233/PPY6574574605_cut.mp3
> 
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavformat/mpeg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

[...]
diff mbox series

Patch

diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 33c0398060..265b2bd1ad 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -99,7 +99,7 @@  static int mpegps_probe(const 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