[FFmpeg-devel] [PATCH] avformat/format: Print debug info when probe score is increased due to mime type
Michael Niedermayer
michael at niedermayer.cc
Thu Feb 25 20:14:57 CET 2016
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavformat/format.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libavformat/format.c b/libavformat/format.c
index 15fe167..7fa06a6 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;
--
1.7.9.5
More information about the ffmpeg-devel
mailing list