diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-12-25 11:27:53 -0800 |
---|---|---|
committer | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-12-25 13:11:09 -0800 |
commit | f16e4a0857e368a4828cd1fbfda7f44cbbf83f06 (patch) | |
tree | 27cf0aabdcf11138e628b95a0406cc315c5bdefa /ffplay.c | |
parent | 0abdcae5a9075fc5527b273822c50ae04c7b0c8f (diff) | |
download | ffmpeg-f16e4a0857e368a4828cd1fbfda7f44cbbf83f06.tar.gz |
ffplay: replace rint by lrint
avoids the float to integer cast, and is slightly superior in terms of
rounding ("Dutch/Gauss rounding").
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'ffplay.c')
-rw-r--r-- | ffplay.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -927,10 +927,10 @@ static void calculate_display_rect(SDL_Rect *rect, /* XXX: we suppose the screen has a 1.0 pixel ratio */ height = scr_height; - width = ((int)rint(height * aspect_ratio)) & ~1; + width = lrint(height * aspect_ratio) & ~1; if (width > scr_width) { width = scr_width; - height = ((int)rint(width / aspect_ratio)) & ~1; + height = lrint(width / aspect_ratio) & ~1; } x = (scr_width - width) / 2; y = (scr_height - height) / 2; |