[vlc-devel] [PATCH 2/2] DirectSound: avoid double call to release function
Felix Abecassis
felix.abecassis at gmail.com
Fri Feb 28 15:55:29 CET 2014
If Start() failed, IDirectSound_Release() was called twice. Use safer
function Stop() instead.
---
modules/audio_output/directsound.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/modules/audio_output/directsound.c b/modules/audio_output/directsound.c
index b2a9ca6..d984015 100644
--- a/modules/audio_output/directsound.c
+++ b/modules/audio_output/directsound.c
@@ -772,10 +772,7 @@ static HRESULT StreamStart( aout_stream_t *s,
hr = Start( VLC_OBJECT(s), sys, fmt );
if( FAILED(hr) )
- {
- IDirectSound_Release( sys->p_dsobject );
goto error;
- }
s->sys = sys;
s->time_get = StreamTimeGet;
@@ -784,6 +781,7 @@ static HRESULT StreamStart( aout_stream_t *s,
s->flush = StreamFlush;
return S_OK;
error:
+ Stop( sys );
free( sys );
return hr;
}
--
1.7.10.4
More information about the vlc-devel
mailing list