aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-05-20 09:33:23 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-05-20 09:33:23 +0000
commite651ba08275a787932d6463773a4823f1b0ca30c (patch)
treefa681a96cf267b2a39129997bc9439ba668258eb /Game
parentf0e4ad452891aec64c777c4bf806fc6f989ee327 (diff)
downloadusdx-e651ba08275a787932d6463773a4823f1b0ca30c.tar.gz
usdx-e651ba08275a787932d6463773a4823f1b0ca30c.tar.xz
usdx-e651ba08275a787932d6463773a4823f1b0ca30c.zip
Fixed a bug in uSMPEG, that causes much memory is not not freeed, after playing a Video File. (Texture and Surface are created new every Time)
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@223 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game')
-rw-r--r--Game/Code/SMpeg/USmpeg.pas4
1 files changed, 3 insertions, 1 deletions
diff --git a/Game/Code/SMpeg/USmpeg.pas b/Game/Code/SMpeg/USmpeg.pas
index c7f756db..85f3f988 100644
--- a/Game/Code/SMpeg/USmpeg.pas
+++ b/Game/Code/SMpeg/USmpeg.pas
@@ -112,8 +112,9 @@ end;
procedure CloseSmpeg;
begin
-// glmovie_quit;
SMPEG_delete(mpeg);
+ //Fixing the Memory Lag in earlyer Versions (X-Mas Mod, all Official Versions)
+ glmovie_quit;
end;
function glmovie_init( Width : GLuint; Height : TGLuint ) : TGLenum;
@@ -294,6 +295,7 @@ end;
procedure glmovie_quit;
begin
glDeleteTextures(1, @texture_ids);
+ SDL_FreeSurface(surface);
end;
end.