mpegvideo_probe: reduce score for invalid streams

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-11-08 22:24:55 +01:00
parent fd791675d4
commit bf0ac7aa69

View File

@ -51,7 +51,8 @@ static int mpegvideo_probe(AVProbeData *p)
}
}
if(seq && seq*9<=pic*10 && pic*9<=slice*10 && !pspack && !apes)
return (pic>1 && !vpes) ? AVPROBE_SCORE_MAX/2+1 : AVPROBE_SCORE_MAX/4; // +1 for .mpg
if(vpes) return AVPROBE_SCORE_MAX/8;
else return pic>1 ? AVPROBE_SCORE_MAX/2+1 : AVPROBE_SCORE_MAX/4; // +1 for .mpg
return 0;
}