Browse Source

avformat/utils: if the id3 tag is too large for data after it to become available, use the full AVPROBE_SCORE_EXTENSION if extension matches

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.3
Michael Niedermayer 11 years ago
parent
commit
b3b505c73b
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      libavformat/utils.c

+ 5
- 2
libavformat/utils.c View File

@@ -264,8 +264,11 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened,
score = 0; score = 0;
if (fmt1->read_probe) { if (fmt1->read_probe) {
score = fmt1->read_probe(&lpd); score = fmt1->read_probe(&lpd);
if (fmt1->extensions && av_match_ext(lpd.filename, fmt1->extensions))
score = FFMAX(score, nodat ? AVPROBE_SCORE_EXTENSION / 2 - 1 : 1);
if (fmt1->extensions && av_match_ext(lpd.filename, fmt1->extensions)) {
if (nodat == 0) score = FFMAX(score, 1);
else if (nodat == 1) score = FFMAX(score, AVPROBE_SCORE_EXTENSION / 2 - 1);
else score = FFMAX(score, AVPROBE_SCORE_EXTENSION);
}
} else if (fmt1->extensions) { } else if (fmt1->extensions) {
if (av_match_ext(lpd.filename, fmt1->extensions)) if (av_match_ext(lpd.filename, fmt1->extensions))
score = AVPROBE_SCORE_EXTENSION; score = AVPROBE_SCORE_EXTENSION;


Loading…
Cancel
Save