mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
get_pix_fmt_score: favor equal formats if all else equal
Fixes Ticket2578 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7f866c14ba
commit
a2802d3cd4
@ -113,7 +113,7 @@ static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt,
|
|||||||
int src_color, dst_color;
|
int src_color, dst_color;
|
||||||
int src_min_depth, src_max_depth, dst_min_depth, dst_max_depth;
|
int src_min_depth, src_max_depth, dst_min_depth, dst_max_depth;
|
||||||
int ret, loss, i, nb_components;
|
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)
|
if (dst_pix_fmt >= AV_PIX_FMT_NB || dst_pix_fmt <= AV_PIX_FMT_NONE)
|
||||||
return ~0;
|
return ~0;
|
||||||
|
Loading…
Reference in New Issue
Block a user