--- I:/gstdirectsoundsink_original.c	Fri Jul 27 16:19:41 2012
+++ I:/gstdirectsoundsink.c	Fri Jul 27 16:19:16 2012
@@ -716,6 +716,7 @@
   WAVEFORMATEX wfx;
   GstCaps *caps;
   GstCaps *tmp, *tmp2;
+  LPDIRECTSOUNDBUFFER tmpBuffer;
 
   caps = gst_caps_copy (template_caps);
 
@@ -742,7 +743,7 @@
   descSecondary.lpwfxFormat = &wfx;
 
   hRes = IDirectSound_CreateSoundBuffer (dsoundsink->pDS, &descSecondary,
-      &dsoundsink->pDSBSecondary, NULL);
+      &tmpBuffer, NULL);
   if (FAILED (hRes)) {
     GST_INFO_OBJECT (dsoundsink, "AC3 passthrough not supported "
         "(IDirectSound_CreateSoundBuffer returned: %s)\n",
@@ -759,7 +760,7 @@
     caps = tmp2;
   } else {
     GST_INFO_OBJECT (dsoundsink, "AC3 passthrough supported");
-    hRes = IDirectSoundBuffer_Release (dsoundsink->pDSBSecondary);
+    hRes = IDirectSoundBuffer_Release (tmpBuffer);
     if (FAILED (hRes)) {
       GST_DEBUG_OBJECT (dsoundsink,
           "(IDirectSoundBuffer_Release returned: %s)\n",
