summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorXavi Artigas <xartigas@fluendo.com>2012-07-27 16:13:49 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-08-06 10:53:24 +0200
commit417cbcf34f01f4d18c40094413143f483ad366f0 (patch)
treef47cadbe248982f57043740e4d015a66ca00dac9 /sys
parent1be98dfa4b5dcc9f23381b97d032c5bacc6f684e (diff)
downloadgstreamer-plugins-good-417cbcf34f01f4d18c40094413143f483ad366f0.tar.gz
directsoundsink: Do not overwrite the DS buffer when testing for AC3 support
https://bugzilla.gnome.org/show_bug.cgi?id=680706
Diffstat (limited to 'sys')
-rw-r--r--sys/directsound/gstdirectsoundsink.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/directsound/gstdirectsoundsink.c b/sys/directsound/gstdirectsoundsink.c
index 4b47e28c0..7385cffea 100644
--- a/sys/directsound/gstdirectsoundsink.c
+++ b/sys/directsound/gstdirectsoundsink.c
@@ -807,6 +807,7 @@ gst_directsound_probe_supported_formats (GstDirectSoundSink * dsoundsink,
WAVEFORMATEX wfx;
GstCaps *caps;
GstCaps *tmp, *tmp2;
+ LPDIRECTSOUNDBUFFER tmpBuffer;
caps = gst_caps_copy (template_caps);
@@ -833,7 +834,7 @@ gst_directsound_probe_supported_formats (GstDirectSoundSink * dsoundsink,
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",
@@ -850,8 +851,7 @@ gst_directsound_probe_supported_formats (GstDirectSoundSink * dsoundsink,
caps = tmp2;
} else {
GST_INFO_OBJECT (dsoundsink, "AC3 passthrough supported");
- hRes = IDirectSoundBuffer_Release (dsoundsink->pDSBSecondary);
- dsoundsink->pDSBSecondary = NULL;
+ hRes = IDirectSoundBuffer_Release (tmpBuffer);
if (FAILED (hRes)) {
GST_DEBUG_OBJECT (dsoundsink,
"(IDirectSoundBuffer_Release returned: %s)\n",