[MPlayer-cvslog] r36183 - trunk/gui/dialog/url.c

ib subversion at mplayerhq.hu
Mon Apr 29 14:10:03 CEST 2013


Author: ib
Date: Mon Apr 29 14:10:03 2013
New Revision: 36183

Log:
Set file prior to adding to the URL list.

An already existing URL list item won't be added, but the allocated url
string will be freed (which thus can't be uiSetFile() nor be added to
the playlist).

Modified:
   trunk/gui/dialog/url.c

Modified: trunk/gui/dialog/url.c
==============================================================================
--- trunk/gui/dialog/url.c	Mon Apr 29 14:03:51 2013	(r36182)
+++ trunk/gui/dialog/url.c	Mon Apr 29 14:10:03 2013	(r36183)
@@ -61,13 +61,14 @@ static void button_clicked(GtkButton *bu
             }
 
             if (str) {
+                uiSetFile(NULL, str, STREAMTYPE_STREAM);
+                listMgr(PLAYLIST_DELETE, 0);
+                add_to_gui_playlist(str, PLAYLIST_ITEM_APPEND);
+
                 item      = calloc(1, sizeof(urlItem));
                 item->url = str;
                 listMgr(URLLIST_ITEM_ADD, item);
 
-                uiSetFile(NULL, str, STREAMTYPE_STREAM);
-                listMgr(PLAYLIST_DELETE, 0);
-                add_to_gui_playlist(str, PLAYLIST_ITEM_APPEND);
                 guiInfo.NewPlay = GUI_FILE_NEW;
                 uiEvent(evPlay, 0);
             }


More information about the MPlayer-cvslog mailing list