[FFmpeg-cvslog] r19890 - trunk/libavformat/utils.c

michael subversion
Wed Sep 16 22:44:26 CEST 2009


Author: michael
Date: Wed Sep 16 22:44:26 2009
New Revision: 19890

Log:
Print a warning if a format has been detected with a low score.

Modified:
   trunk/libavformat/utils.c

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	Wed Sep 16 22:23:04 2009	(r19889)
+++ trunk/libavformat/utils.c	Wed Sep 16 22:44:26 2009	(r19890)
@@ -474,8 +474,12 @@ int av_open_input_file(AVFormatContext *
             }
             /* 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);
     }



More information about the ffmpeg-cvslog mailing list