Index: gui/win32/interface.c
===================================================================
--- gui/win32/interface.c	(revision 34452)
+++ gui/win32/interface.c	(working copy)
@@ -119,15 +119,12 @@
             guiInfo.Angle = dvd_angle;
             guiInfo.NewPlay = GUI_FILE_SAME;
 
-            uiSetFileName(NULL, dvd_device, STREAMTYPE_DVD);
             dvdname[0] = 0;
             strcat(dvdname, "DVD Movie");
             GetVolumeInformation(dvd_device, dvdname, MAX_PATH, NULL, NULL, NULL, NULL, 0);
             capitalize(dvdname);
             mp_msg(MSGT_GPLAYER, MSGL_V, "Opening DVD %s -> %s\n", dvd_device, dvdname);
             gui(GUI_PREPARE, (void *) STREAMTYPE_DVD);
-            mygui->playlist->clear_playlist(mygui->playlist);
-            mygui->playlist->add_track(mygui->playlist, filename, NULL, dvdname, 0);
             mygui->startplay(mygui);
             break;
         }
@@ -475,7 +472,6 @@
 /* this function gets called by mplayer to update the gui */
 int gui(int what, void *data)
 {
-    stream_t *stream = data;
 #ifdef CONFIG_DVDREAD
     dvd_priv_t *dvdp;
 #endif
@@ -493,6 +489,7 @@
     {
         case GUI_PREPARE:
         {
+            int stream = (int) data;
             audio_id = -1;
             video_id = -1;
             dvdsub_id = -1;
@@ -501,9 +498,6 @@
             autosync = 0;
             dvd_title = 0;
             force_fps = 0;
-            if(!mygui->playlist->tracks) return 0;
-            uiSetFileName(NULL, mygui->playlist->tracks[mygui->playlist->current]->filename, STREAMTYPE_FILE);
-            guiInfo.Track = mygui->playlist->current + 1;
             guiInfo.VideoWindow = 1;
             if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm");
             if(gtkAOExtraStereo)
@@ -517,10 +511,13 @@
             if(gtkCacheOn) stream_cache_size = gtkCacheSize;
             if(gtkAutoSyncOn) autosync = gtkAutoSync;
             guiInfo.NewPlay = 0;
-            switch(guiInfo.StreamType)
+            switch(stream)
             {
                 case STREAMTYPE_FILE:
                 case STREAMTYPE_STREAM:
+            if(!mygui->playlist->tracks) return 0;
+            uiSetFileName(NULL, mygui->playlist->tracks[mygui->playlist->current]->filename, stream);
+            guiInfo.Track = mygui->playlist->current + 1;
                     break;
 #ifdef CONFIG_DVDREAD
                 case STREAMTYPE_DVD:
@@ -531,6 +528,8 @@
                     dvd_angle = guiInfo.Angle;
                     sprintf(tmp,"dvd://%d", guiInfo.Track);
                     uiSetFileName(NULL, tmp, STREAMTYPE_DVD);
+		    mygui->playlist->clear_playlist(mygui->playlist);
+	            mygui->playlist->add_track(mygui->playlist, filename, NULL, filename, 0);
                     break;
                 }
 #endif
@@ -576,6 +575,7 @@
         }
         case GUI_SET_STREAM:
         {
+            stream_t *stream = data;
             guiInfo.StreamType = stream->type;
             switch(stream->type)
             {
Index: gui/win32/gui.c
===================================================================
--- gui/win32/gui.c	(revision 34452)
+++ gui/win32/gui.c	(working copy)
@@ -1059,6 +1059,7 @@
                                 handlemsg(hWnd, evPlayDVD);
 #endif
                             }
+			    else {
                             sprintf(searchpath, "%sTrack01.cda", device + pos);
                             if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES)
                             {
@@ -1087,6 +1088,7 @@
                                 }
                                 gui->startplay(gui);
                             }
+			    }
                         }
                         cdromdrive++;
                     }
