[MPlayer-cvslog] r33738 - in trunk: gui/interface.c mplayer.c

ib subversion at mplayerhq.hu
Mon Jun 27 12:46:25 CEST 2011


Author: ib
Date: Mon Jun 27 12:46:25 2011
New Revision: 33738

Log:
Simplify code concerning guiGetEvent type guiSetAudioOnly.

Modified:
   trunk/gui/interface.c
   trunk/mplayer.c

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Mon Jun 27 12:35:25 2011	(r33737)
+++ trunk/gui/interface.c	Mon Jun 27 12:46:25 2011	(r33738)
@@ -595,7 +595,7 @@ int guiGetEvent(int type, void *arg)
 
         guiInfo.AudioOnly = (int)arg;
 
-        if ((int)arg) {
+        if (guiInfo.AudioOnly) {
             guiInfo.NoWindow = True;
             wsVisibleWindow(&guiApp.subWindow, wsHideWindow);
         } else

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Mon Jun 27 12:35:25 2011	(r33737)
+++ trunk/mplayer.c	Mon Jun 27 12:46:25 2011	(r33738)
@@ -3678,10 +3678,7 @@ goto_enable_cache:
 #ifdef CONFIG_GUI
         if (use_gui) {
             guiInfo.AudioChannels = mpctx->sh_audio ? mpctx->sh_audio->channels : 0;
-            if (!mpctx->sh_video && mpctx->sh_audio)
-                guiGetEvent(guiSetAudioOnly, (void *)1);
-            else
-                guiGetEvent(guiSetAudioOnly, (void *)0);
+            guiGetEvent(guiSetAudioOnly, (void *)(mpctx->sh_audio && !mpctx->sh_video));
             guiGetEvent(guiSetFileFormat, (void *)mpctx->demuxer->file_format);
             if (guiGetEvent(guiSetValues, mpctx->sh_video))
                 goto goto_next_file;


More information about the MPlayer-cvslog mailing list