changeset 29798:93289dea4d15

Reuse the init_error exit path also for init_best_audio_codec errors.
author reimar
date Fri, 06 Nov 2009 16:08:00 +0000
parents 92abe9f73079
children 8867109cf6f6
files mplayer.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Fri Nov 06 16:06:33 2009 +0000
+++ b/mplayer.c	Fri Nov 06 16:08:00 2009 +0000
@@ -1611,9 +1611,7 @@
   current_module="init_audio_codec";
   mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
   if(!init_best_audio_codec(mpctx->sh_audio,audio_codec_list,audio_fm_list)){
-    mpctx->sh_audio=mpctx->d_audio->sh=NULL; // failed to init :(
-    mpctx->d_audio->id = -2;
-    return;
+    goto init_error;
   }
     initialized_flags|=INITIALIZED_ACODEC;
   mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");