# HG changeset patch # User diego # Date 1159016815 0 # Node ID ef94dfe93fe8f25f117d4c2f2e5675aeb00493df # Parent 15ae9558e41e4bb823abe09250eee84c0cacb969 Fix the sound mute switch in the GUI menu by moving the corresponding piece of GUI code after audio initialization. patch by Stanislav Maslovski, stanislav.maslovski gmail com diff -r 15ae9558e41e -r ef94dfe93fe8 mplayer.c --- a/mplayer.c Sat Sep 23 11:07:58 2006 +0000 +++ b/mplayer.c Sat Sep 23 13:06:55 2006 +0000 @@ -3875,17 +3875,6 @@ if(verbose) term_osd = 0; fflush(stdout); -#ifdef HAVE_NEW_GUI - if ( use_gui ) - { - if ( sh_audio ) guiIntfStruct.AudioType=sh_audio->channels; else guiIntfStruct.AudioType=0; - if ( !sh_video && sh_audio ) guiGetEvent( guiSetAudioOnly,(char *)1 ); else guiGetEvent( guiSetAudioOnly,(char *)0 ); - guiGetEvent( guiSetFileFormat,(char *)demuxer->file_format ); - if ( guiGetEvent( guiSetValues,(char *)sh_video ) ) goto goto_next_file; - guiGetEvent( guiSetDemuxer,(char *)demuxer ); - } -#endif - { //int frame_corr_num=0; // //float v_frame=0; // Video @@ -3958,6 +3947,16 @@ mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_FPSforced,sh_video->fps,sh_video->frametime); } +#ifdef HAVE_NEW_GUI +if ( use_gui ) { + if ( sh_audio ) guiIntfStruct.AudioType=sh_audio->channels; else guiIntfStruct.AudioType=0; + if ( !sh_video && sh_audio ) guiGetEvent( guiSetAudioOnly,(char *)1 ); else guiGetEvent( guiSetAudioOnly,(char *)0 ); + guiGetEvent( guiSetFileFormat,(char *)demuxer->file_format ); + if ( guiGetEvent( guiSetValues,(char *)sh_video ) ) goto goto_next_file; + guiGetEvent( guiSetDemuxer,(char *)demuxer ); +} +#endif + //==================== START PLAYING ======================= if(loop_times>1) loop_times--; else