[vlc-commits] aout: fix cleanup after error
Rémi Denis-Courmont
git at videolan.org
Sun Jul 22 21:39:33 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 22 22:36:20 2012 +0300| [e4ed088f04623240265bf1ee455a285e464b5d42] | committer: Rémi Denis-Courmont
aout: fix cleanup after error
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e4ed088f04623240265bf1ee455a285e464b5d42
---
src/audio_output/dec.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index f24a27f..b7d102b 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -133,8 +133,11 @@ void aout_Shutdown (audio_output_t *p_aout)
aout_InputDelete (p_aout, input);
owner->input = NULL;
- aout_OutputDelete( p_aout );
- aout_volume_Delete (owner->volume);
+ if (likely(owner->module != NULL))
+ {
+ aout_OutputDelete( p_aout );
+ aout_volume_Delete (owner->volume);
+ }
var_Destroy( p_aout, "audio-device" );
var_Destroy( p_aout, "audio-channels" );
More information about the vlc-commits
mailing list