aboutsummaryrefslogtreecommitdiffstats
path: root/code
diff options
context:
space:
mode:
Diffstat (limited to 'code')
-rw-r--r--code/client/cl_main.c2
-rw-r--r--code/client/snd_codec.c7
-rw-r--r--code/client/snd_codec.h2
-rw-r--r--code/client/snd_codec_ogg.c12
-rw-r--r--code/client/snd_codec_wav.c4
-rw-r--r--code/sys/sys_main.c22
6 files changed, 26 insertions, 23 deletions
diff --git a/code/client/cl_main.c b/code/client/cl_main.c
index 100cb3b..d77633c 100644
--- a/code/client/cl_main.c
+++ b/code/client/cl_main.c
@@ -889,6 +889,8 @@ void CL_Disconnect( qboolean showMainMenu ) {
// Stop recording any video
if( CL_VideoRecording( ) ) {
+ // Finish rendering current frame
+ SCR_UpdateScreen( );
CL_CloseAVI( );
}
CL_UpdateGUID( NULL, 0 );
diff --git a/code/client/snd_codec.c b/code/client/snd_codec.c
index 52435c1..41456ce 100644
--- a/code/client/snd_codec.c
+++ b/code/client/snd_codec.c
@@ -226,8 +226,9 @@ snd_stream_t *S_CodecUtilOpen(const char *filename, snd_codec_t *codec)
S_CodecUtilClose
=================
*/
-void S_CodecUtilClose(snd_stream_t *stream)
+void S_CodecUtilClose(snd_stream_t **stream)
{
- FS_FCloseFile(stream->file);
- Z_Free(stream);
+ FS_FCloseFile((*stream)->file);
+ Z_Free(*stream);
+ *stream = NULL;
}
diff --git a/code/client/snd_codec.h b/code/client/snd_codec.h
index 5ada65d..03fcaa2 100644
--- a/code/client/snd_codec.h
+++ b/code/client/snd_codec.h
@@ -77,7 +77,7 @@ int S_CodecReadStream(snd_stream_t *stream, int bytes, void *buffer);
// Util functions (used by codecs)
snd_stream_t *S_CodecUtilOpen(const char *filename, snd_codec_t *codec);
-void S_CodecUtilClose(snd_stream_t *stream);
+void S_CodecUtilClose(snd_stream_t **stream);
// WAV Codec
extern snd_codec_t wav_codec;
diff --git a/code/client/snd_codec_ogg.c b/code/client/snd_codec_ogg.c
index 3ea703a..98a5697 100644
--- a/code/client/snd_codec_ogg.c
+++ b/code/client/snd_codec_ogg.c
@@ -251,7 +251,7 @@ snd_stream_t *S_OGG_CodecOpenStream(const char *filename)
vf = Z_Malloc(sizeof(OggVorbis_File));
if(!vf)
{
- S_CodecUtilClose(stream);
+ S_CodecUtilClose(&stream);
return NULL;
}
@@ -261,7 +261,7 @@ snd_stream_t *S_OGG_CodecOpenStream(const char *filename)
{
Z_Free(vf);
- S_CodecUtilClose(stream);
+ S_CodecUtilClose(&stream);
return NULL;
}
@@ -273,7 +273,7 @@ snd_stream_t *S_OGG_CodecOpenStream(const char *filename)
Z_Free(vf);
- S_CodecUtilClose(stream);
+ S_CodecUtilClose(&stream);
return NULL;
}
@@ -285,7 +285,7 @@ snd_stream_t *S_OGG_CodecOpenStream(const char *filename)
Z_Free(vf);
- S_CodecUtilClose(stream);
+ S_CodecUtilClose(&stream);
return NULL;
}
@@ -298,7 +298,7 @@ snd_stream_t *S_OGG_CodecOpenStream(const char *filename)
Z_Free(vf);
- S_CodecUtilClose(stream);
+ S_CodecUtilClose(&stream);
return NULL;
}
@@ -343,7 +343,7 @@ void S_OGG_CodecCloseStream(snd_stream_t *stream)
Z_Free(stream->ptr);
// close the stream
- S_CodecUtilClose(stream);
+ S_CodecUtilClose(&stream);
}
/*
diff --git a/code/client/snd_codec_wav.c b/code/client/snd_codec_wav.c
index a020841..c0b2e2e 100644
--- a/code/client/snd_codec_wav.c
+++ b/code/client/snd_codec_wav.c
@@ -255,7 +255,7 @@ snd_stream_t *S_WAV_CodecOpenStream(const char *filename)
// Read the RIFF header
if(!S_ReadRIFFHeader(rv->file, &rv->info))
{
- S_CodecUtilClose(rv);
+ S_CodecUtilClose(&rv);
return NULL;
}
@@ -269,7 +269,7 @@ S_WAV_CodecCloseStream
*/
void S_WAV_CodecCloseStream(snd_stream_t *stream)
{
- S_CodecUtilClose(stream);
+ S_CodecUtilClose(&stream);
}
/*
diff --git a/code/sys/sys_main.c b/code/sys/sys_main.c
index 453b082..30039d7 100644
--- a/code/sys/sys_main.c
+++ b/code/sys/sys_main.c
@@ -587,21 +587,21 @@ int main( int argc, char **argv )
char commandLine[ MAX_STRING_CHARS ] = { 0 };
#ifndef DEDICATED
- const SDL_version *ver = SDL_Linked_Version( );
+ const SDL_version *ver = SDL_Linked_Version( );
#define STRING(s) #s
#define XSTRING(s) STRING(s)
#define MINSDL_VERSION \
- XSTRING(MINSDL_MAJOR) "." \
- XSTRING(MINSDL_MINOR) "." \
- XSTRING(MINSDL_PATCH)
-
- if( SDL_VERSIONNUM( ver->major, ver->minor, ver->patch ) <
- SDL_VERSIONNUM( MINSDL_MAJOR, MINSDL_MINOR, MINSDL_PATCH ) )
- {
- Sys_Print( "SDL version " MINSDL_VERSION " or greater required\n" );
- Sys_Exit( 1 );
- }
+ XSTRING(MINSDL_MAJOR) "." \
+ XSTRING(MINSDL_MINOR) "." \
+ XSTRING(MINSDL_PATCH)
+
+ if( SDL_VERSIONNUM( ver->major, ver->minor, ver->patch ) <
+ SDL_VERSIONNUM( MINSDL_MAJOR, MINSDL_MINOR, MINSDL_PATCH ) )
+ {
+ Sys_Print( "SDL version " MINSDL_VERSION " or greater required\n" );
+ Sys_Exit( 1 );
+ }
#endif
Sys_ParseArgs( argc, argv );