SMPEG mem leak fixed.
Robert Diel
robert at littlebitlost.com
Tue Jan 21 12:38:32 EST 2003
NUNOKAWA Masato sent me this fix. It works, no more leak. I think the
most important part of it was the delete[] data and delete[] buffer. In
any case thank you all for all your help.
Robert
------------------ <CUT HERE> -------------------
diff -r smpeg/MPEG.cpp smpeg-0.4.5/MPEG.cpp
101c101,103
< audioaction_enabled = videoaction_enabled = false;
---
//audioaction_enabled = videoaction_enabled = false;
audioaction_enabled = SDLaudio;
videoaction_enabled = false;
diff -r smpeg/MPEGlist.cpp smpeg-0.4.5/MPEGlist.cpp
19c19,20
< delete data;
---
//delete data;
delete[] data;
diff -r smpeg/MPEGsystem.cpp smpeg-0.4.5/MPEGsystem.cpp
1168c1168,1169
< delete buffer;
---
delete[] buffer;
//delete buffer;
diff -r smpeg/audio/MPEGaudio.cpp smpeg-0.4.5/audio/MPEGaudio.cpp
201a202,206
#ifdef THREADED_AUDIO
/* Stop the decode thread */
StopDecoding();
#endif
211a217,218
diff -r smpeg/audio/mpegtoraw.cpp smpeg-0.4.5/audio/mpegtoraw.cpp
368c368
< audio->decode_thread = NULL;
---
//audio->decode_thread = NULL;
diff -r smpeg/smpeg.spec.in smpeg-0.4.5/smpeg.spec.in
3c3
< %define rel 1
---
%define rel 2
More information about the smpeg
mailing list