[MPlayer-cvslog] r34479 - in trunk/gui/win32: gui.c interface.c
ib
subversion at mplayerhq.hu
Sat Dec 31 14:20:30 CET 2011
Author: ib
Date: Sat Dec 31 14:20:29 2011
New Revision: 34479
Log:
Fix Win32 GUI DVD playback.
The "open disk" menu item for DVDs didn't work.
Reported by Stephen Sheldon, sfsheldo gmail com.
Modified:
trunk/gui/win32/gui.c
trunk/gui/win32/interface.c
Modified: trunk/gui/win32/gui.c
==============================================================================
--- trunk/gui/win32/gui.c Sat Dec 31 14:15:30 2011 (r34478)
+++ trunk/gui/win32/gui.c Sat Dec 31 14:20:29 2011 (r34479)
@@ -1055,7 +1055,6 @@ static LRESULT CALLBACK EventProc(HWND h
#ifdef CONFIG_DVDREAD
free(dvd_device);
dvd_device = strdup(device + pos);
- dvd_title = dvd_chapter = dvd_angle = 1;
handlemsg(hWnd, evPlayDVD);
#endif
}
Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c Sat Dec 31 14:15:30 2011 (r34478)
+++ trunk/gui/win32/interface.c Sat Dec 31 14:20:29 2011 (r34479)
@@ -114,9 +114,9 @@ static void guiSetEvent(int event)
case evPlayDVD:
{
static char dvdname[MAX_PATH];
- guiInfo.Track = dvd_title;
- guiInfo.Chapter = dvd_chapter;
- guiInfo.Angle = dvd_angle;
+ guiInfo.Track = 1;
+ guiInfo.Chapter = 1;
+ guiInfo.Angle = 1;
guiInfo.NewPlay = GUI_FILE_SAME;
uiSetFileName(NULL, dvd_device, STREAMTYPE_DVD);
@@ -125,10 +125,9 @@ static void guiSetEvent(int event)
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);
+ uiPlay();
break;
}
#endif
@@ -502,31 +501,17 @@ int gui(int what, void *data)
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)
- {
- 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)
{
case STREAMTYPE_FILE:
case STREAMTYPE_STREAM:
+ uiSetFileName(NULL, mygui->playlist->tracks[mygui->playlist->current]->filename, STREAMTYPE_FILE);
+ guiInfo.Track = mygui->playlist->current + 1;
break;
#ifdef CONFIG_DVDREAD
case STREAMTYPE_DVD:
{
char tmp[512];
- dvd_title = guiInfo.Track;
dvd_chapter = guiInfo.Chapter;
dvd_angle = guiInfo.Angle;
sprintf(tmp,"dvd://%d", guiInfo.Track);
@@ -535,6 +520,19 @@ int gui(int what, void *data)
}
#endif
}
+ guiInfo.VideoWindow = 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;
break;
}
case GUI_SET_AUDIO:
More information about the MPlayer-cvslog
mailing list