changeset 29866:32af1e6ef8d3

Check that mpctx->audio_out is not NULL when trying to uninit it. Make audio uninit consistent with e.g. the demuxer uninit code and also avoids a possible crash.
author reimar
date Fri, 13 Nov 2009 13:21:59 +0000
parents a5deeffff4d0
children a8e0b5425393
files mplayer.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Fri Nov 13 07:54:30 2009 +0000
+++ b/mplayer.c	Fri Nov 13 13:21:59 2009 +0000
@@ -649,7 +649,8 @@
     initialized_flags&=~INITIALIZED_AO;
     current_module="uninit_ao";
     if (mpctx->edl_muted) mixer_mute(&mpctx->mixer);
-    mpctx->audio_out->uninit(mpctx->eof?0:1); mpctx->audio_out=NULL;
+    if (mpctx->audio_out) mpctx->audio_out->uninit(mpctx->eof?0:1);
+    mpctx->audio_out=NULL;
   }
 
 #ifdef CONFIG_GUI