[FFmpeg-cvslog] r15173 - trunk/ffplay.c

michael subversion
Wed Sep 3 13:16:29 CEST 2008


Author: michael
Date: Wed Sep  3 13:16:29 2008
New Revision: 15173

Log:
Fix round to even for aspect ratio correction.


Modified:
   trunk/ffplay.c

Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c	(original)
+++ trunk/ffplay.c	Wed Sep  3 13:16:29 2008
@@ -731,10 +731,10 @@ static void video_image_display(VideoSta
 
         /* 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;




More information about the ffmpeg-cvslog mailing list