X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fformat.c;h=7fa06a68be330d7afc9d63cb663103f21fc940db;hb=4873952f886b718810e5ecf2ef26ca53173e9935;hp=15fe167fb2b6fa53140b6796c6175fcb2ff1459e;hpb=278dcec28db8f309cf202b002966f06b9d275248;p=ffmpeg diff --git a/libavformat/format.c b/libavformat/format.c index 15fe167fb2b..7fa06a68be3 100644 --- a/libavformat/format.c +++ b/libavformat/format.c @@ -223,8 +223,12 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, if (av_match_ext(lpd.filename, fmt1->extensions)) score = AVPROBE_SCORE_EXTENSION; } - if (av_match_name(lpd.mime_type, fmt1->mime_type)) - score = FFMAX(score, AVPROBE_SCORE_MIME); + if (av_match_name(lpd.mime_type, fmt1->mime_type)) { + if (AVPROBE_SCORE_MIME > score) { + av_log(NULL, AV_LOG_DEBUG, "Probing %s score:%d increased to %d due to MIME type\n", fmt1->name, score, AVPROBE_SCORE_MIME); + score = AVPROBE_SCORE_MIME; + } + } if (score > score_max) { score_max = score; fmt = fmt1;