[FFmpeg-devel] [PATCH 2/3] lavd/utils: always look at file extension when probing

Anton Khirnov anton
Fri Nov 12 18:18:10 CET 2010


---
 libavformat/utils.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 36e93bc..ec30d64 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -367,9 +367,10 @@ AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score
         score = 0;
         if (fmt1->read_probe) {
             score = fmt1->read_probe(&lpd);
-        } else if (fmt1->extensions) {
+        }
+        if (fmt1->extensions) {
             if (av_match_ext(lpd.filename, fmt1->extensions)) {
-                score = 50;
+                score = FFMIN(AVPROBE_SCORE_MAX, score + AVPROBE_SCORE_MAX/2);
             }
         }
         if (score > *score_max) {
-- 
1.7.2.3




More information about the ffmpeg-devel mailing list