# HG changeset patch # User ib # Date 1310299299 0 # Node ID b42abb9c7f2cf1dd96b979e38d56b48d2715a32c # Parent 474ffcdcc6e7c8e15eb4c2384f197871da9691b5 Remove member FPS from struct guiInterface_t. Retrieve the information directly using member sh_video. diff -r 474ffcdcc6e7 -r b42abb9c7f2c gui/interface.c --- a/gui/interface.c Sun Jul 10 11:51:25 2011 +0000 +++ b/gui/interface.c Sun Jul 10 12:01:39 2011 +0000 @@ -692,11 +692,6 @@ guiInfo.sh_video = arg; - if (arg) { - sh_video_t *sh = arg; - guiInfo.FPS = sh->fps; - } - if (guiInfo.StreamType == STREAMTYPE_STREAM) btnSet(evSetMoviePosition, btnDisabled); else @@ -1146,7 +1141,7 @@ if (name) { mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_LoadingSubtitles, name); - subdata = sub_read_file(name, guiInfo.FPS); + subdata = sub_read_file(name, (guiInfo.sh_video ? guiInfo.sh_video->fps : 0)); if (!subdata) gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_CantLoadSub, name); diff -r 474ffcdcc6e7 -r b42abb9c7f2c gui/interface.h --- a/gui/interface.h Sun Jul 10 11:51:25 2011 +0000 +++ b/gui/interface.h Sun Jul 10 12:01:39 2011 +0000 @@ -126,7 +126,6 @@ int StreamType; int TimeSec; int LengthInSec; - float FPS; char *Filename; int FilenameChanged; diff -r 474ffcdcc6e7 -r b42abb9c7f2c gui/win32/dialogs.c --- a/gui/win32/dialogs.c Sun Jul 10 11:51:25 2011 +0000 +++ b/gui/win32/dialogs.c Sun Jul 10 12:01:39 2011 +0000 @@ -76,7 +76,7 @@ if (name) { mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_LoadingSubtitles, name); - subdata = sub_read_file(strdup(name), guiInfo.FPS); + subdata = sub_read_file(strdup(name), (guiInfo.sh_video ? guiInfo.sh_video->fps : 0)); if (!subdata) mp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_CantLoadSub,name); sub_name = (malloc(2 * sizeof(char*))); /* when mplayer will be restarted */ sub_name[0] = strdup(name); /* sub_name[0] will be read */ diff -r 474ffcdcc6e7 -r b42abb9c7f2c gui/win32/interface.c --- a/gui/win32/interface.c Sun Jul 10 11:51:25 2011 +0000 +++ b/gui/win32/interface.c Sun Jul 10 12:01:39 2011 +0000 @@ -562,7 +562,6 @@ { sh_video_t *sh = arg; codecname = sh->codec->name; - guiInfo.FPS = sh->fps; /* we have video, show the subwindow */ if(!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow))