Mercurial > mplayer.hg
changeset 36455:c9fb71a139bb
Use variable for passed data in GUI_SET_AUDIO.
This follows the other GUI_SET calls,
and avoids the cast.
author | ib |
---|---|
date | Tue, 17 Dec 2013 22:18:13 +0000 |
parents | 9a28d5c4320a |
children | 514b38743990 |
files | gui/interface.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/interface.c Tue Dec 17 22:12:19 2013 +0000 +++ b/gui/interface.c Tue Dec 17 22:18:13 2013 +0000 @@ -310,6 +310,7 @@ dvd_priv_t *dvd; #endif int msg, state; + sh_audio_t *sh_audio; mixer_t *mixer; plItem *next = NULL; @@ -688,9 +689,11 @@ case GUI_SET_AUDIO: - guiInfo.AudioChannels = data ? ((sh_audio_t *)data)->channels : 0; + sh_audio = data; - if (data && !guiInfo.sh_video) { + guiInfo.AudioChannels = sh_audio ? sh_audio->channels : 0; + + if (sh_audio && !guiInfo.sh_video) { guiInfo.VideoWindow = False; guiInfo.VideoWidth = 0; guiInfo.VideoHeight = 0;