[FFmpeg-cvslog] get_pix_fmt_score: favor equal formats if all else equal
Michael Niedermayer
git at videolan.org
Sat Jun 29 22:38:38 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jun 29 22:20:20 2013 +0200| [a2802d3cd496a1375f0468f1b0cabf36b40ba480] | committer: Michael Niedermayer
get_pix_fmt_score: favor equal formats if all else equal
Fixes Ticket2578
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a2802d3cd496a1375f0468f1b0cabf36b40ba480
---
libavcodec/imgconvert.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 6da531c..a2bcdbc 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;
More information about the ffmpeg-cvslog
mailing list