# HG changeset patch # User amenkov # Date 1288699179 -10800 # Node ID 7fe7dbe02025d1e2d76bc32e0073d06ced10869d # Parent 6af860e045276c70715bb4f1e0a1005107a4866b 6950553: Applet: IE process crash in OLE32.DLL when playing a sound Reviewed-by: poonam diff -r 6af860e04527 -r 7fe7dbe02025 jdk/make/javax/sound/jsoundds/Makefile --- a/jdk/make/javax/sound/jsoundds/Makefile Tue Nov 02 15:08:56 2010 +0900 +++ b/jdk/make/javax/sound/jsoundds/Makefile Tue Nov 02 14:59:39 2010 +0300 @@ -53,7 +53,7 @@ # # Extra cc/linker flags. # -LDLIBS += dsound.lib winmm.lib user32.lib +LDLIBS += dsound.lib winmm.lib user32.lib ole32.lib CPPFLAGS += \ -DUSE_DAUDIO=TRUE \ -I$(SHARE_SRC)/native/com/sun/media/sound \ diff -r 6af860e04527 -r 7fe7dbe02025 jdk/src/windows/native/com/sun/media/sound/PLATFORM_API_WinOS_DirectSound.cpp --- a/jdk/src/windows/native/com/sun/media/sound/PLATFORM_API_WinOS_DirectSound.cpp Tue Nov 02 15:08:56 2010 +0900 +++ b/jdk/src/windows/native/com/sun/media/sound/PLATFORM_API_WinOS_DirectSound.cpp Tue Nov 02 14:59:39 2010 +0300 @@ -476,6 +476,7 @@ DWORD WINAPI __stdcall DS_StartBufferHelper::ThreadProc(void *param) { + ::CoInitialize(NULL); while (1) { // wait for something to do ::WaitForSingleObject(data.startEvent, INFINITE); @@ -492,6 +493,7 @@ } ::SetEvent(data.startedEvent); } + ::CoUninitialize(); return 0; }