[MPlayer-cvslog] r35253 - in trunk: gui/interface.c gui/win32/dialogs.c gui/win32/interface.c stream/open.c stream/stream.h stream/stream_dvd.c
ib
subversion at mplayerhq.hu
Thu Oct 18 14:17:58 CEST 2012
Author: ib
Date: Thu Oct 18 14:17:58 2012
New Revision: 35253
Log:
Get rid of global variable dvd_title in GUI.
Its usage is pointless anyway, because the GUI uses guiInfo.Track
instead.
As a result, it doesn't have to be global any longer and can be defined
in stream/stream_dvd.c (where it belongs).
Modified:
trunk/gui/interface.c
trunk/gui/win32/dialogs.c
trunk/gui/win32/interface.c
trunk/stream/open.c
trunk/stream/stream.h
trunk/stream/stream_dvd.c
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Thu Oct 18 14:07:59 2012 (r35252)
+++ trunk/gui/interface.c Thu Oct 18 14:17:58 2012 (r35253)
@@ -397,7 +397,6 @@ int gui(int what, void *data)
wsVisibleMouse(&guiApp.videoWindow, wsHideMouseCursor);
if (guiInfo.NewPlay == GUI_FILE_NEW) {
- dvd_title = 0;
audio_id = -1;
video_id = -1;
dvdsub_id = -1;
@@ -630,7 +629,6 @@ int gui(int what, void *data)
guiInfo.Subtitles = dvd->nr_of_subtitles;
memcpy(guiInfo.Subtitle, dvd->subtitles, sizeof(dvd->subtitles));
#endif
- guiInfo.Track = dvd_title + 1;
guiInfo.Chapter = dvd_chapter + 1;
guiInfo.Angle = dvd_angle + 1;
break;
Modified: trunk/gui/win32/dialogs.c
==============================================================================
--- trunk/gui/win32/dialogs.c Thu Oct 18 14:07:59 2012 (r35252)
+++ trunk/gui/win32/dialogs.c Thu Oct 18 14:17:58 2012 (r35253)
@@ -827,7 +827,7 @@ static LRESULT CALLBACK TitleChapterWndP
sprintf(&titles[i], "%d", guiInfo.Tracks - i);
SendDlgItemMessage(hwnd, ID_TITLESEL, CB_INSERTSTRING, 0, (LPARAM) &titles[i]);
}
- SendDlgItemMessage(hwnd, ID_TITLESEL, CB_SETCURSEL, dvd_title, 0);
+ SendDlgItemMessage(hwnd, ID_TITLESEL, CB_SETCURSEL, guiInfo.Track - 1, 0);
for (j=0; j<guiInfo.Chapters; j++)
{
Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c Thu Oct 18 14:07:59 2012 (r35252)
+++ trunk/gui/win32/interface.c Thu Oct 18 14:17:58 2012 (r35253)
@@ -580,7 +580,6 @@ int gui(int what, void *data)
vobsub_id = -1;
stream_cache_size = -1;
autosync = 0;
- dvd_title = 0;
force_fps = 0;
if(!mygui->playlist->tracks) return 0;
switch(guiInfo.StreamType)
@@ -673,7 +672,6 @@ int gui(int what, void *data)
#endif
guiInfo.Chapter = dvd_chapter + 1;
guiInfo.Angle = dvd_angle + 1;
- guiInfo.Track = dvd_title + 1;
break;
}
break;
Modified: trunk/stream/open.c
==============================================================================
--- trunk/stream/open.c Thu Oct 18 14:07:59 2012 (r35252)
+++ trunk/stream/open.c Thu Oct 18 14:17:58 2012 (r35253)
@@ -42,7 +42,6 @@ char* cdrom_device=NULL;
int dvd_chapter=1;
int dvd_last_chapter=0;
char* dvd_device=NULL;
-int dvd_title=0;
char *bluray_device=NULL;
// Open a new stream (stdin/file/vcd/url)
Modified: trunk/stream/stream.h
==============================================================================
--- trunk/stream/stream.h Thu Oct 18 14:07:59 2012 (r35252)
+++ trunk/stream/stream.h Thu Oct 18 14:17:58 2012 (r35253)
@@ -379,7 +379,6 @@ int stream_seek_internal(stream_t *s, of
extern int bluray_angle;
extern int bluray_chapter;
extern int dvd_speed;
-extern int dvd_title;
extern int dvd_chapter;
extern int dvd_last_chapter;
extern int dvd_angle;
Modified: trunk/stream/stream_dvd.c
==============================================================================
--- trunk/stream/stream_dvd.c Thu Oct 18 14:07:59 2012 (r35252)
+++ trunk/stream/stream_dvd.c Thu Oct 18 14:17:58 2012 (r35253)
@@ -44,6 +44,7 @@
#include "libmpdemux/demuxer.h"
static char* dvd_device_current;
+static int dvd_title;
int dvd_angle=1;
#define LIBDVDREAD_VERSION(maj,min,micro) ((maj)*10000 + (min)*100 + (micro))
More information about the MPlayer-cvslog
mailing list