aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/img2.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-12-04 11:42:48 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-12-04 11:42:48 +0000
commitd1e8675c2ebd0a422539034d7607e93df86e44f3 (patch)
treed8c3f816159811e63c4b7037ef26ca2106fa9621 /libavformat/img2.c
parentcf1e119bb21c6d041acf9b33e1693e41e99b08f1 (diff)
downloadffmpeg-d1e8675c2ebd0a422539034d7607e93df86e44f3.tar.gz
probe with some success image files not containing number pattern but having recognized image extension
Originally committed as revision 7219 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/img2.c')
-rw-r--r--libavformat/img2.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c
index 303190ad24..7708584067 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -154,10 +154,13 @@ static int find_image_range(int *pfirst_index, int *plast_index,
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){