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

ib subversion at mplayerhq.hu
Mon Dec 10 03:27:55 CET 2012


Author: ib
Date: Mon Dec 10 03:27:55 2012
New Revision: 35649

Log:
Simplify code.

Call listMgr(PLAYLIST_ITEM_GET_CURR, 0) only once.

Modified:
   trunk/gui/interface.c

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Mon Dec 10 03:25:03 2012	(r35648)
+++ trunk/gui/interface.c	Mon Dec 10 03:27:55 2012	(r35649)
@@ -845,10 +845,12 @@ int gui(int what, void *data)
                 guiInfo.Angle = 1;
 
             if (isPlaylistStreamtype) {
-                if (!listMgr(PLAYLIST_ITEM_GET_CURR, 0))
+                plItem *curr = listMgr(PLAYLIST_ITEM_GET_CURR, 0);
+
+                if (!curr)
                     uiUnsetFile();
-                else if (listMgr(PLAYLIST_ITEM_GET_CURR, 0) != listMgr(PLAYLIST_GET, 0)) {
-                    plItem *curr = listMgr(PLAYLIST_ITEM_SET_CURR, listMgr(PLAYLIST_GET, 0));
+                else if (curr != listMgr(PLAYLIST_GET, 0)) {
+                    curr = listMgr(PLAYLIST_ITEM_SET_CURR, listMgr(PLAYLIST_GET, 0));
                     uiSetFile(curr->path, curr->name, STREAMTYPE_FILE);
                     guiInfo.Track = 1;
                 }


More information about the MPlayer-cvslog mailing list