Patch for smpeg-0.4.4, MPEGaudio::Stop
Adam Procter
adam at mlug.missouri.edu
Sat Jun 8 03:32:34 EDT 2002
Howdy...
I've found what I think is a little bug in smpeg-0.4.4. The MPEGaudio::Stop
function will attempt to lock SDL audio even if smpeg hasn't been told to
initialize/handle the SDL audio. In my project this results in a deadlock
on account of my different (and currently rather weird) locking scheme.
--
Adam Procter
adam at mlug.missouri.edu
--- smpeg-0.4.4/audio/MPEGaudio.cpp.orig Wed Apr 4 15:42:40 2001
+++ smpeg-0.4.4/audio/MPEGaudio.cpp Sat Jun 8 01:54:23 2002
@@ -200,9 +200,11 @@
MPEGaudio:: Stop(void)
{
if ( valid_stream ) {
- SDL_LockAudio();
+ if ( sdl_audio )
+ SDL_LockAudio();
playing = false;
- SDL_UnlockAudio();
+ if ( sdl_audio )
+ SDL_UnlockAudio();
}
ResetPause();
}
More information about the smpeg
mailing list