Mercurial > libavformat.hg
changeset 5213:d7558c9ed907 libavformat
Print a warning if a format has been detected with a low score.
author | michael |
---|---|
date | Wed, 16 Sep 2009 20:44:26 +0000 |
parents | 716e143af3c0 |
children | dd04eacd063b |
files | utils.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Wed Sep 16 20:23:04 2009 +0000 +++ b/utils.c Wed Sep 16 20:44:26 2009 +0000 @@ -474,8 +474,12 @@ } /* 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); }