Mercurial > mplayer.hg
comparison mplayer.c @ 29795:72e11974c9c3
Use an early return instead of a {} block over the whole function in reinit_audio_chain
author | reimar |
---|---|
date | Fri, 06 Nov 2009 15:59:42 +0000 |
parents | df1826dcdb2d |
children | 75a6843dbae0 |
comparison
equal
deleted
inserted
replaced
29794:df1826dcdb2d | 29795:72e11974c9c3 |
---|---|
1604 ///@} | 1604 ///@} |
1605 // OSDMsgStack | 1605 // OSDMsgStack |
1606 | 1606 |
1607 | 1607 |
1608 void reinit_audio_chain(void) { | 1608 void reinit_audio_chain(void) { |
1609 if(mpctx->sh_audio){ | 1609 if (!mpctx->sh_audio) |
1610 return; | |
1610 current_module="init_audio_codec"; | 1611 current_module="init_audio_codec"; |
1611 mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n"); | 1612 mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n"); |
1612 if(!init_best_audio_codec(mpctx->sh_audio,audio_codec_list,audio_fm_list)){ | 1613 if(!init_best_audio_codec(mpctx->sh_audio,audio_codec_list,audio_fm_list)){ |
1613 mpctx->sh_audio=mpctx->d_audio->sh=NULL; // failed to init :( | 1614 mpctx->sh_audio=mpctx->d_audio->sh=NULL; // failed to init :( |
1614 mpctx->d_audio->id = -2; | 1615 mpctx->d_audio->id = -2; |
1664 } | 1665 } |
1665 #endif | 1666 #endif |
1666 } | 1667 } |
1667 mpctx->mixer.audio_out = mpctx->audio_out; | 1668 mpctx->mixer.audio_out = mpctx->audio_out; |
1668 mpctx->mixer.volstep = volstep; | 1669 mpctx->mixer.volstep = volstep; |
1669 } | |
1670 return; | 1670 return; |
1671 | 1671 |
1672 init_error: | 1672 init_error: |
1673 uninit_player(INITIALIZED_ACODEC|INITIALIZED_AO); // close codec and possibly AO | 1673 uninit_player(INITIALIZED_ACODEC|INITIALIZED_AO); // close codec and possibly AO |
1674 mpctx->sh_audio=mpctx->d_audio->sh=NULL; // -> nosound | 1674 mpctx->sh_audio=mpctx->d_audio->sh=NULL; // -> nosound |