static void SCR_CaptureVideo_RIFF_OverflowCheck(int framesize)
{
LOAD_FORMATSPECIFIC_AVI();
- fs_offset_t cursize, curfilesize;
+ fs_offset_t cursize;
+ //fs_offset_t curfilesize;
if (format->riffstacklevel != 2)
Sys_Error("SCR_CaptureVideo_RIFF_OverflowCheck: chunk stack leakage!\n");
// check where we are in the file
SCR_CaptureVideo_RIFF_Flush();
cursize = SCR_CaptureVideo_RIFF_GetPosition() - format->riffstackstartoffset[0];
- curfilesize = SCR_CaptureVideo_RIFF_GetPosition();
+ //curfilesize = SCR_CaptureVideo_RIFF_GetPosition();
// if this would overflow the windows limit of 1GB per RIFF chunk, we need
// to close the current RIFF chunk and open another for future frames
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;