From: havoc Date: Sat, 3 Feb 2007 03:08:57 +0000 (+0000) Subject: fixed bug in AVI RIFF chunk 1GB size limiting code (it was not accounting for the... X-Git-Tag: xonotic-v0.1.0preview~3638 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0e020b6f2457b98ffe075ee36cf37e4430128d7f;p=xonotic%2Fdarkplaces.git fixed bug in AVI RIFF chunk 1GB size limiting code (it was not accounting for the index buffer size which will be written afterward) which was causing the chunk to often exceed 1GB git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6773 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_screen.c b/cl_screen.c index 2da15b32..e09b8d43 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -826,11 +826,9 @@ static void SCR_CaptureVideo_RIFF_OverflowCheck(int framesize) cursize = SCR_CaptureVideo_RIFF_GetPosition() - cls.capturevideo.riffstackstartoffset[0]; // 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 - if (8 + cursize + framesize > 1<<30) + if (8 + cursize + framesize + cls.capturevideo.riffindexbuffer.cursize + 8 > 1<<30) { SCR_CaptureVideo_RIFF_Finish(); - while (cls.capturevideo.riffstacklevel > 0) - SCR_CaptureVideo_RIFF_Pop(); // begin a new 1GB extended section of the AVI SCR_CaptureVideo_RIFF_Push("RIFF", "AVIX"); SCR_CaptureVideo_RIFF_Push("LIST", "movi");