Mercurial > mplayer.hg
changeset 37092:4eeb8a38a971
Simplify code.
Set guiInfo.AudioChannels in existing if/else statement.
author | ib |
---|---|
date | Wed, 07 May 2014 14:07:12 +0000 |
parents | ec312b34e302 |
children | cdb4677ef147 |
files | gui/interface.c gui/win32/interface.c |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/interface.c Wed May 07 14:03:40 2014 +0000 +++ b/gui/interface.c Wed May 07 14:07:12 2014 +0000 @@ -811,12 +811,13 @@ 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);
--- a/gui/win32/interface.c Wed May 07 14:03:40 2014 +0000 +++ b/gui/win32/interface.c Wed May 07 14:07:12 2014 +0000 @@ -627,12 +627,15 @@ 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);