X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=cap_avi.c;h=e1c0e9396c4f4c82e8763173cf0376117c34d189;hb=2579f601bf44e3bb7f6da849e803b22f90a0db3e;hp=623be4ead72a92a3aff6305f3642a39f8746891c;hpb=a82aa01db1d538417a440a4201c602a74c09b88e;p=xonotic%2Fdarkplaces.git diff --git a/cap_avi.c b/cap_avi.c index 623be4ea..e1c0e939 100644 --- a/cap_avi.c +++ b/cap_avi.c @@ -309,7 +309,8 @@ static void SCR_CaptureVideo_RIFF_Finish(qboolean final) 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"); @@ -319,7 +320,7 @@ static void SCR_CaptureVideo_RIFF_OverflowCheck(int framesize) // 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 @@ -351,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; @@ -403,7 +404,7 @@ static void SCR_CaptureVideo_Avi_VideoFrames(int num) } } -void SCR_CaptureVideo_Avi_EndVideo() +void SCR_CaptureVideo_Avi_EndVideo(void) { LOAD_FORMATSPECIFIC_AVI(); @@ -494,7 +495,7 @@ void SCR_CaptureVideo_Avi_SoundFrame(const portable_sampleframe_t *paintbuffer, } } -void SCR_CaptureVideo_Avi_BeginVideo() +void SCR_CaptureVideo_Avi_BeginVideo(void) { int width = cls.capturevideo.width; int height = cls.capturevideo.height;