]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Print a warning if a format has been detected with a low score.
authormichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 16 Sep 2009 20:44:26 +0000 (20:44 +0000)
committermichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 16 Sep 2009 20:44:26 +0000 (20:44 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19890 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavformat/utils.c

index 0e1d7553434cf4f24dcd67c33cc1c9fffdb03214..373157bc8359189af1089301228c039e6ae0cd63 100644 (file)
@@ -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);
     }