]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cap_avi.c
Merge remote branch 'origin/master' into akari/irc
[xonotic/darkplaces.git] / cap_avi.c
index e7cf88d675f9cf363a5876d7c0b4f2fec8fcf8b5..e1c0e9396c4f4c82e8763173cf0376117c34d189 100644 (file)
--- a/cap_avi.c
+++ b/cap_avi.c
@@ -352,7 +352,7 @@ static void SCR_CaptureVideo_ConvertFrame_BGRA_to_I420_flip(int width, int heigh
                        blockb = b[0];
                        *out = cls.capturevideo.yuvnormalizetable[0][cls.capturevideo.rgbtoyuvscaletable[0][0][blockr] + cls.capturevideo.rgbtoyuvscaletable[0][1][blockg] + cls.capturevideo.rgbtoyuvscaletable[0][2][blockb]];
                }
-               if ((y & 1) == 0)
+               if ((y & 1) == 0 && y/2 < height/2) // if h is odd, this skips the last row
                {
                        // 2x2 Cr and Cb planes
                        int inpitch = width*4;