diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-03-25 16:12:51 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-05-04 21:43:06 +0200 |
commit | e0f8be6413b6a8d334d6052e610af32935c310af (patch) | |
tree | 1548e782ae23ad6e46225593b96928a85d1286a5 /libavformat/utils.c | |
parent | 4d7ed3e73541983459a7913c2034eba69ebc113d (diff) | |
download | ffmpeg-e0f8be6413b6a8d334d6052e610af32935c310af.tar.gz |
avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriate
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index e1acb254b6..75dc3631e2 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -309,7 +309,7 @@ AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score score = fmt1->read_probe(&lpd); } else if (fmt1->extensions) { if (av_match_ext(lpd.filename, fmt1->extensions)) { - score = 50; + score = AVPROBE_SCORE_EXTENSION; } } if (score > *score_max) { @@ -320,18 +320,18 @@ AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score } /* a hack for files with huge id3v2 tags -- try to guess by file extension. */ - if (!fmt && is_opened && *score_max < AVPROBE_SCORE_MAX/4) { + if (!fmt && is_opened && *score_max < AVPROBE_SCORE_EXTENSION / 2) { while ((fmt = av_iformat_next(fmt))) if (fmt->extensions && av_match_ext(lpd.filename, fmt->extensions)) { - *score_max = AVPROBE_SCORE_MAX/4; + *score_max = AVPROBE_SCORE_EXTENSION / 2; break; } } - if (!fmt && id3 && *score_max < AVPROBE_SCORE_MAX/4-1) { + if (!fmt && id3 && *score_max < AVPROBE_SCORE_EXTENSION / 2 - 1) { while ((fmt = av_iformat_next(fmt))) if (fmt->extensions && av_match_ext("mp3", fmt->extensions)) { - *score_max = AVPROBE_SCORE_MAX/4-1; + *score_max = AVPROBE_SCORE_EXTENSION / 2 - 1; break; } } |