[MPlayer-cvslog] r38081 - trunk/gui/win32/dialogs.c

ib subversion at mplayerhq.hu
Fri Apr 13 13:06:59 EEST 2018


Author: ib
Date: Fri Apr 13 13:06:59 2018
New Revision: 38081

Log:
Remove pointless code in Win32 GUI.

Don't use sub_name[] to pass the subtitle name, because the following
call to update_set_of_subtitles() will handle it by using subdata.

Modified:
   trunk/gui/win32/dialogs.c

Modified: trunk/gui/win32/dialogs.c
==============================================================================
--- trunk/gui/win32/dialogs.c	Fri Apr 13 13:03:00 2018	(r38080)
+++ trunk/gui/win32/dialogs.c	Fri Apr 13 13:06:59 2018	(r38081)
@@ -76,9 +76,6 @@ void mplayerLoadSubtitle(const char *nam
         mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_GUI_MSG_LoadingSubtitle, name);
         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 */
-        sub_name[1] = NULL;
     }
     update_set_of_subtitles();
 }


More information about the MPlayer-cvslog mailing list