changeset 1551:ee4ef413497e libavformat

probe with some success image files not containing number pattern but having recognized image extension
author bcoudurier
date Mon, 04 Dec 2006 11:42:48 +0000
parents 4cb185273d4b
children de18846fa25c
files img2.c
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/img2.c	Sun Dec 03 05:47:55 2006 +0000
+++ b/img2.c	Mon Dec 04 11:42:48 2006 +0000
@@ -154,10 +154,13 @@
 
 static int image_probe(AVProbeData *p)
 {
-    if (av_filename_number_test(p->filename) && av_str2id(img_tags, p->filename))
-        return AVPROBE_SCORE_MAX;
-    else
-        return 0;
+    if (av_str2id(img_tags, p->filename)) {
+        if (av_filename_number_test(p->filename))
+            return AVPROBE_SCORE_MAX;
+        else
+            return AVPROBE_SCORE_MAX/2;
+    }
+    return 0;
 }
 
 enum CodecID av_guess_image2_codec(const char *filename){