diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-09-16 20:44:26 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-09-16 20:44:26 +0000 |
commit | 1bc8c36125dbd21b2cdf7c721f753df01b13eb3e (patch) | |
tree | 69244e080d3c5db3535c441450bf7b6c6b2f0483 | |
parent | c36823fd3d9028b165d4be0b79607e4d05cc69e5 (diff) | |
download | ffmpeg-1bc8c36125dbd21b2cdf7c721f753df01b13eb3e.tar.gz |
Print a warning if a format has been detected with a low score.
Originally committed as revision 19890 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/utils.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 0e1d755343..373157bc83 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -474,8 +474,12 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, } /* guess file format */ fmt = av_probe_input_format2(pd, 1, &score); - if(fmt) - av_log(*ic_ptr, AV_LOG_DEBUG, "Probe with size=%d detected %s with score=%d\n", probe_size, fmt->name, score); + if(fmt){ + if(score <= AVPROBE_SCORE_MAX/4){ //this can only be true in the last iteration + av_log(*ic_ptr, AV_LOG_WARNING, "Format detected only with low score of %d, misdetection possible!\n", score); + }else + av_log(*ic_ptr, AV_LOG_DEBUG, "Probed with size=%d and score=%d\n", probe_size, score); + } } av_freep(&pd->buf); } |