gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_st


From: Bastiaan Jacques
Subject: Re: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-91-gc03ea7e
Date: Fri, 18 Feb 2011 23:33:05 +0100 (CET)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

I think something similar may be desirable for the aos4/ and mkit/ sound
handlers.

Bastiaan

On Fri, 18 Feb 2011, Bastiaan Jacques wrote:

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=c03ea7ec043e5ebe206d00cb1d936e403b48b006


commit c03ea7ec043e5ebe206d00cb1d936e403b48b006
Author: Bastiaan Jacques <address@hidden>
Date:   Fri Feb 18 23:17:23 2011 +0100

   Override unplugInputStream so _inputStreams is accessed in a
   thread-safe manner. Fixes bug #32538.

diff --git a/libsound/sdl/sound_handler_sdl.cpp 
b/libsound/sdl/sound_handler_sdl.cpp
index 80af7d6..5081467 100644
--- a/libsound/sdl/sound_handler_sdl.cpp
+++ b/libsound/sdl/sound_handler_sdl.cpp
@@ -338,6 +338,14 @@ SDL_sound_handler::unpause()
    sound_handler::unpause();
}

+void
+SDL_sound_handler::unplugInputStream(InputStream* id)
+{
+    boost::mutex::scoped_lock lock(_mutex);
+
+    sound_handler::unplugInputStream(id);
+}
+
} // gnash.sound namespace
} // namespace gnash

diff --git a/libsound/sdl/sound_handler_sdl.h b/libsound/sdl/sound_handler_sdl.h
index b0f060b..b7bf867 100644
--- a/libsound/sdl/sound_handler_sdl.h
+++ b/libsound/sdl/sound_handler_sdl.h
@@ -153,6 +153,9 @@ public:
    // Overridden to unpause SDL audio
    void plugInputStream(std::auto_ptr<InputStream> in);

+    // Overidden to provide thread safety.
+    void unplugInputStream(InputStream* id);
+
    // See dox in sound_handler.h
    void fetchSamples(boost::int16_t* to, unsigned int nSamples);
};

-----------------------------------------------------------------------

Summary of changes:
libsound/sdl/sound_handler_sdl.cpp |    8 ++++++++
libsound/sdl/sound_handler_sdl.h   |    3 +++
2 files changed, 11 insertions(+), 0 deletions(-)


hooks/post-receive
--
Gnash

_______________________________________________
Gnash-commit mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/gnash-commit




reply via email to

[Prev in Thread] Current Thread [Next in Thread]