From bb6c34e55b158c457272046ed9f22b974e832fb5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 3 Sep 2008 11:16:29 +0000 Subject: Fix round to even for aspect ratio correction. Originally committed as revision 15173 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffplay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ffplay.c b/ffplay.c index 1119b4fe00..7fe54924c6 100644 --- a/ffplay.c +++ b/ffplay.c @@ -731,10 +731,10 @@ static void video_image_display(VideoState *is) /* XXX: we suppose the screen has a 1.0 pixel ratio */ height = is->height; - width = ((int)rint(height * aspect_ratio)) & -3; + width = ((int)rint(height * aspect_ratio)) & ~1; if (width > is->width) { width = is->width; - height = ((int)rint(width / aspect_ratio)) & -3; + height = ((int)rint(width / aspect_ratio)) & ~1; } x = (is->width - width) / 2; y = (is->height - height) / 2; -- cgit v1.2.3