directsoundsink: fix access to invalid pointer in set_volume

This commit is contained in:
Andoni Morales Alastruey 2012-05-31 19:22:47 +02:00 committed by Sebastian Dröge
parent f72a55319d
commit c38fa466c3

View file

@ -751,6 +751,7 @@ gst_directsound_probe_supported_formats (GstDirectSoundSink * dsoundsink,
} else { } else {
GST_INFO_OBJECT (dsoundsink, "AC3 passthrough supported"); GST_INFO_OBJECT (dsoundsink, "AC3 passthrough supported");
hRes = IDirectSoundBuffer_Release (dsoundsink->pDSBSecondary); hRes = IDirectSoundBuffer_Release (dsoundsink->pDSBSecondary);
dsoundsink->pDSBSecondary = NULL;
if (FAILED (hRes)) { if (FAILED (hRes)) {
GST_DEBUG_OBJECT (dsoundsink, GST_DEBUG_OBJECT (dsoundsink,
"(IDirectSoundBuffer_Release returned: %s)\n", "(IDirectSoundBuffer_Release returned: %s)\n",