correctly fix odd dimensions (it was incorrectly fixed in previous commit)
authorStepan777 <stepik-777@mail.ru>
Sun, 24 Jun 2012 21:15:20 +0400
changeset 7282 c65992e2d794
parent 7280 fd707afbc3a2
child 7284 24c6fa591866
correctly fix odd dimensions (it was incorrectly fixed in previous commit)
hedgewars/avwrapper.c
--- a/hedgewars/avwrapper.c	Sun Jun 24 20:57:02 2012 +0400
+++ b/hedgewars/avwrapper.c	Sun Jun 24 21:15:20 2012 +0400
@@ -208,8 +208,8 @@
 
     // put parameters
     // resolution must be a multiple of two
-    g_pVideo->width = g_Width;
-    g_pVideo->height = g_Height;
+    g_pVideo->width  = g_Width  & ~1; // make even (dimensions should be even)
+    g_pVideo->height = g_Height & ~1; // make even
     /* time base: this is the fundamental unit of time (in seconds) in terms
        of which frame timestamps are represented. for fixed-fps content,
        timebase should be 1/framerate and timestamp increments should be
@@ -344,8 +344,8 @@
     AddFileLogRaw = pAddFileLogRaw;
     av_log_set_callback( &LogCallback );
 
-    g_Width  = Width  & ~1; // make even (dimensions should be even)
-    g_Height = Height & ~1; // make even
+    g_Width  = Width;
+    g_Height = Height;
     g_Framerate.num = FramerateNum;
     g_Framerate.den = FramerateDen;
     g_VQuality = VQuality;