Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-30 00:20:20 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-06-30 00:20:20 +0400
commita2802d3cd496a1375f0468f1b0cabf36b40ba480 (patch)
tree640bd6e50b8d8f3b83ea4f9446ecc54e1da127a9 /libavcodec/imgconvert.c
parent7f866c14ba3da024244483939088c48cfd5d1422 (diff)
get_pix_fmt_score: favor equal formats if all else equal
Fixes Ticket2578 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/imgconvert.c')
-rw-r--r--libavcodec/imgconvert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 6da531c658..a2bcdbcca7 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -113,7 +113,7 @@ static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt,
int src_color, dst_color;
int src_min_depth, src_max_depth, dst_min_depth, dst_max_depth;
int ret, loss, i, nb_components;
- int score = INT_MAX;
+ int score = INT_MAX - 1;
if (dst_pix_fmt >= AV_PIX_FMT_NB || dst_pix_fmt <= AV_PIX_FMT_NONE)
return ~0;