]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fixed bug in AVI RIFF chunk 1GB size limiting code (it was not accounting for the...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 3 Feb 2007 03:08:57 +0000 (03:08 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 3 Feb 2007 03:08:57 +0000 (03:08 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6773 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c

index 2da15b322b93597437df166f6babc8661d55826b..e09b8d43991d1de02277e431c1c9cd05109fd215 100644 (file)
@@ -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");