]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cap_avi.c
added sv_disablenotify cvar (default 1) to suppress prints about
[xonotic/darkplaces.git] / cap_avi.c
index e1b9e9a4e82c15bede4e556c99d627fb77bc24d9..486243645860d80488191e9d9249d26f05999648 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 && y/2 < h/2) // if h is odd, this skips the last row
+               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;
@@ -462,12 +462,12 @@ void SCR_CaptureVideo_Avi_SoundFrame(const portable_sampleframe_t *paintbuffer,
        {
                int n0, n1;
 
-               n0 = paintbuffer[i].sample[0];
+               n0 = paintbuffer[i].sample[0] * 32768.0f;
                n0 = bound(-32768, n0, 32767);
                out_ptr[0] = (unsigned char)n0;
                out_ptr[1] = (unsigned char)(n0 >> 8);
 
-               n1 = paintbuffer[i].sample[1];
+               n1 = paintbuffer[i].sample[1] * 32768.0f;
                n1 = bound(-32768, n1, 32767);
                out_ptr[2] = (unsigned char)n1;
                out_ptr[3] = (unsigned char)(n1 >> 8);