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

ib subversion at mplayerhq.hu
Fri Apr 13 13:12:18 EEST 2018


Author: ib
Date: Fri Apr 13 13:12:18 2018
New Revision: 38082

Log:
Don't continue in case of an evLoadSubtitle error in Win32 GUI.

Calling update_set_of_subtitles() in case of a sub_read_file() error
would delete the currently used subtitle instead of loading a new one.

Modified:
   trunk/gui/win32/dialogs.c

Modified: trunk/gui/win32/dialogs.c
==============================================================================
--- trunk/gui/win32/dialogs.c	Fri Apr 13 13:06:59 2018	(r38081)
+++ trunk/gui/win32/dialogs.c	Fri Apr 13 13:12:18 2018	(r38082)
@@ -75,7 +75,11 @@ 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);
+        if (!subdata)
+        {
+            mp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_CantLoadSub,name);
+            return;
+        }
     }
     update_set_of_subtitles();
 }


More information about the MPlayer-cvslog mailing list