summaryrefslogtreecommitdiff
path: root/libavformat/format.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-02-25 19:36:01 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-06-05 16:35:40 +0200
commit2ccf9ae6ccc8888ce27b6867d87c30c5743e72ce (patch)
tree93c6dc497dea76a3bb9e543b607933cd65f44243 /libavformat/format.c
parent5fb6e39dd1c3add4dc5bd7c7f0d8100d5aadad46 (diff)
avformat/format: Print debug info when probe score is increased due to mime type
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/format.c')
-rw-r--r--libavformat/format.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/format.c b/libavformat/format.c
index 15fe167fb2..7fa06a68be 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;