[MPlayer-cvslog] r37188 - in trunk/gui: interface.c win32/interface.c
ib
subversion at mplayerhq.hu
Wed May 7 16:07:12 CEST 2014
Author: ib
Date: Wed May 7 16:07:12 2014
New Revision: 37188
Log:
Simplify code.
Set guiInfo.AudioChannels in existing if/else statement.
Modified:
trunk/gui/interface.c
trunk/gui/win32/interface.c
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Wed May 7 16:03:40 2014 (r37187)
+++ trunk/gui/interface.c Wed May 7 16:07:12 2014 (r37188)
@@ -811,12 +811,13 @@ int gui(int what, void *data)
sh_audio = data;
if (sh_audio) {
+ guiInfo.AudioChannels = sh_audio->channels;
ad = sh_audio->ad_driver;
guiInfo.AudioPassthrough = (gstrcmp(ad->info->short_name, "hwac3") == 0);
- } else
+ } else {
+ guiInfo.AudioChannels = 0;
guiInfo.AudioPassthrough = False;
-
- guiInfo.AudioChannels = (sh_audio ? sh_audio->channels : 0);
+ }
if (guiInfo.AudioPassthrough)
btnSet(evSetVolume, btnDisabled);
Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c Wed May 7 16:03:40 2014 (r37187)
+++ trunk/gui/win32/interface.c Wed May 7 16:07:12 2014 (r37188)
@@ -627,12 +627,15 @@ int gui(int what, void *data)
sh_audio = data;
if (sh_audio)
{
+ guiInfo.AudioChannels = sh_audio->channels;
ad = sh_audio->ad_driver;
guiInfo.AudioPassthrough = (gstrcmp(ad->info->short_name, "hwac3") == 0);
}
else
+ {
+ guiInfo.AudioChannels = 0;
guiInfo.AudioPassthrough = FALSE;
- guiInfo.AudioChannels = sh_audio ? sh_audio->channels : 0;
+ }
if (sh_audio && !guiInfo.sh_video) guiInfo.VideoWindow = FALSE;
if(IsWindowVisible(mygui->videowindow) && !guiInfo.VideoWindow)
ShowWindow(mygui->videowindow, SW_HIDE);
More information about the MPlayer-cvslog
mailing list