[MPlayer-cvslog] r36551 - trunk/gui/interface.c

ib subversion at mplayerhq.hu
Tue Dec 17 23:18:13 CET 2013


Author: ib
Date: Tue Dec 17 23:18:13 2013
New Revision: 36551

Log:
Use variable for passed data in GUI_SET_AUDIO.

This follows the other GUI_SET calls,
and avoids the cast.

Modified:
   trunk/gui/interface.c

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Tue Dec 17 23:12:19 2013	(r36550)
+++ trunk/gui/interface.c	Tue Dec 17 23:18:13 2013	(r36551)
@@ -310,6 +310,7 @@ int gui(int what, void *data)
     dvd_priv_t *dvd;
 #endif
     int msg, state;
+    sh_audio_t *sh_audio;
     mixer_t *mixer;
     plItem *next   = NULL;
 
@@ -688,9 +689,11 @@ int gui(int what, void *data)
 
     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;


More information about the MPlayer-cvslog mailing list