[MPlayer-cvslog] r34757 - in trunk/gui: interface.c ui/main.c util/list.c util/list.h
ib
subversion at mplayerhq.hu
Wed Feb 22 14:27:43 CET 2012
Author: ib
Date: Wed Feb 22 14:27:42 2012
New Revision: 34757
Log:
Remove global variable pointing to playlist item last played.
The variable and the condition it is used for are pointless, because
it isn't possible to insert an playlist item before the current one
without rebuilding the whole list which would invalidate this pointer.
Modified:
trunk/gui/interface.c
trunk/gui/ui/main.c
trunk/gui/util/list.c
trunk/gui/util/list.h
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Wed Feb 22 11:53:00 2012 (r34756)
+++ trunk/gui/interface.c Wed Feb 22 14:27:42 2012 (r34757)
@@ -772,8 +772,9 @@ int gui(int what, void *data)
break;
}
- if (guiInfo.Playing && (next = listMgr(PLAYLIST_ITEM_GET_NEXT, 0)) && (plLastPlayed != next)) {
- plLastPlayed = next;
+ next = listMgr(PLAYLIST_ITEM_GET_NEXT, 0);
+
+ if (guiInfo.Playing && next) {
uiSetFileName(next->path, next->name, STREAMTYPE_FILE);
guiInfo.NewPlay = GUI_FILE_NEW;
guiInfo.Track++;
Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c Wed Feb 22 11:53:00 2012 (r34756)
+++ trunk/gui/ui/main.c Wed Feb 22 14:27:42 2012 (r34757)
@@ -211,7 +211,6 @@ play:
if ( listMgr( PLAYLIST_ITEM_GET_CURR,0 ) &&( guiInfo.StreamType == STREAMTYPE_FILE ) )
{
plItem * next = listMgr( PLAYLIST_ITEM_GET_CURR,0 );
- plLastPlayed=next;
uiSetFileName( next->path,next->name,SAME_STREAMTYPE );
}
Modified: trunk/gui/util/list.c
==============================================================================
--- trunk/gui/util/list.c Wed Feb 22 11:53:00 2012 (r34756)
+++ trunk/gui/util/list.c Wed Feb 22 14:27:42 2012 (r34757)
@@ -24,7 +24,6 @@
static plItem *plList;
static plItem *plCurrent;
-plItem *plLastPlayed;
static urlItem *urlList;
Modified: trunk/gui/util/list.h
==============================================================================
--- trunk/gui/util/list.h Wed Feb 22 11:53:00 2012 (r34756)
+++ trunk/gui/util/list.h Wed Feb 22 14:27:42 2012 (r34757)
@@ -46,8 +46,6 @@ typedef struct urlItem {
struct urlItem *next;
} urlItem;
-extern plItem *plLastPlayed;
-
/// @name list manager (playlist, URL list)
void *listMgr(int cmd, void *data);
More information about the MPlayer-cvslog
mailing list