mirror of
https://github.com/mpv-player/mpv
synced 2024-11-03 03:19:24 +01:00
demux_lavf: reject format probe matches with low score
When trying to determine the format of an input stream, demux_lavf retries the probe with a larger buffer size up to some limit if the match score is low, but when reaching the size limit it accepted the best match (if any) regardless of its score. Change it to require a score of at least AVPROBE_SCORE_MAX/4 to accept a match at all.
This commit is contained in:
parent
37b756bb70
commit
c0724413fd
@ -201,7 +201,7 @@ static int lavf_check_file(demuxer_t *demuxer){
|
||||
read_size > 0 && probe_data_size < PROBE_BUF_SIZE);
|
||||
av_free(avpd.buf);
|
||||
|
||||
if(!priv->avif){
|
||||
if (!priv->avif || score <= AVPROBE_SCORE_MAX / 4) {
|
||||
mp_msg(MSGT_HEADER,MSGL_V,"LAVF_check: no clue about this gibberish!\n");
|
||||
return 0;
|
||||
}else
|
||||
|
Loading…
Reference in New Issue
Block a user