changeset 33775:b42abb9c7f2c

Remove member FPS from struct guiInterface_t. Retrieve the information directly using member sh_video.
author ib
date Sun, 10 Jul 2011 12:01:39 +0000
parents 474ffcdcc6e7
children 4fae8b19fbbd
files gui/interface.c gui/interface.h gui/win32/dialogs.c gui/win32/interface.c
diffstat 4 files changed, 2 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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);
--- 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;
--- 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 */
--- 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))