diff options
author | Baptiste Coudurier | 2006-12-04 11:42:48 +0000 |
---|---|---|
committer | Baptiste Coudurier | 2006-12-04 11:42:48 +0000 |
commit | d1e8675c2ebd0a422539034d7607e93df86e44f3 (patch) | |
tree | d8c3f816159811e63c4b7037ef26ca2106fa9621 | |
parent | cf1e119bb21c6d041acf9b33e1693e41e99b08f1 (diff) |
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
-rw-r--r-- | libavformat/img2.c | 11 |
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){ |