Mercurial > mplayer.hg
diff gui/win32/interface.c @ 34052:9f19a87d2062
Remove gui() instruction GUI_SET_FILE.
Move the preparation part to GUI_PREPARE and the part
resetting variable guiInfo.sh_video to GUI_END_FILE.
author | ib |
---|---|
date | Tue, 27 Sep 2011 14:15:42 +0000 |
parents | dd0e5dc6ebbf |
children | 418e04046d98 |
line wrap: on
line diff
--- a/gui/win32/interface.c Mon Sep 26 17:25:45 2011 +0000 +++ b/gui/win32/interface.c Tue Sep 27 14:15:42 2011 +0000 @@ -446,7 +446,28 @@ { case GUI_PREPARE: { - gui(GUI_SET_FILE, 0); + audio_id = -1; + video_id = -1; + dvdsub_id = -1; + vobsub_id = -1; + stream_cache_size = -1; + autosync = 0; + dvd_title = 0; + force_fps = 0; + if(!mygui->playlist->tracks) return 0; + filename = guiInfo.Filename = mygui->playlist->tracks[mygui->playlist->current]->filename; + guiInfo.Track = mygui->playlist->current + 1; + if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm"); + if(gtkAOExtraStereo) + { + char *name = malloc(12 + 20 + 1); + snprintf(name, 12 + 20, "extrastereo=%f", gtkAOExtraStereoMul); + name[12 + 20] = 0; + greplace(&af_cfg.list, "extrastereo", name); + free(name); + } + if(gtkCacheOn) stream_cache_size = gtkCacheSize; + if(gtkAutoSyncOn) autosync = gtkAutoSync; guiInfo.NewPlay = 0; switch(guiInfo.StreamType) { @@ -594,32 +615,6 @@ } break; } - case GUI_SET_FILE: - { - audio_id = -1; - video_id = -1; - dvdsub_id = -1; - vobsub_id = -1; - stream_cache_size = -1; - autosync = 0; - dvd_title = 0; - force_fps = 0; - if(!mygui->playlist->tracks) return 0; - filename = guiInfo.Filename = mygui->playlist->tracks[mygui->playlist->current]->filename; - guiInfo.Track = mygui->playlist->current + 1; - if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm"); - if(gtkAOExtraStereo) - { - char *name = malloc(12 + 20 + 1); - snprintf(name, 12 + 20, "extrastereo=%f", gtkAOExtraStereoMul); - name[12 + 20] = 0; - greplace(&af_cfg.list, "extrastereo", name); - free(name); - } - if(gtkCacheOn) stream_cache_size = gtkCacheSize; - if(gtkAutoSyncOn) autosync = gtkAutoSync; - break; - } case GUI_HANDLE_EVENTS: break; case GUI_SET_MIXER: