mirror of
https://github.com/ioquake/ioq3.git
synced 2025-05-31 09:01:54 +00:00
- Fix memory leak in DMA sound after S_Shutdown()
- Make codec load use temp hunk memory instead of zone mem - Fix sound issues with direct sound and game_restart (#4526)
This commit is contained in:
parent
f921cddc2b
commit
a5f31084d4
10 changed files with 34 additions and 23 deletions
|
@ -450,7 +450,7 @@ void *S_OGG_CodecLoad(const char *filename, snd_info_t *info)
|
|||
|
||||
// allocate a buffer
|
||||
// this buffer must be free-ed by the caller of this function
|
||||
buffer = Z_Malloc(info->size);
|
||||
buffer = Hunk_AllocateTempMemory(info->size);
|
||||
if(!buffer)
|
||||
{
|
||||
S_OGG_CodecCloseStream(stream);
|
||||
|
@ -464,7 +464,7 @@ void *S_OGG_CodecLoad(const char *filename, snd_info_t *info)
|
|||
// we don't even have read a single byte
|
||||
if(bytesRead <= 0)
|
||||
{
|
||||
Z_Free(buffer);
|
||||
Hunk_FreeTempMemory(buffer);
|
||||
S_OGG_CodecCloseStream(stream);
|
||||
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue