[MPlayer-cvslog] r25292 - in trunk: mp_core.h mplayer.c

ulion subversion at mplayerhq.hu
Tue Dec 4 13:34:45 CET 2007


Author: ulion
Date: Tue Dec  4 13:34:44 2007
New Revision: 25292

Log:
When auto loading subs, log warning instead of error for load failure.


Modified:
   trunk/mp_core.h
   trunk/mplayer.c

Modified: trunk/mp_core.h
==============================================================================
--- trunk/mp_core.h	(original)
+++ trunk/mp_core.h	Tue Dec  4 13:34:44 2007
@@ -125,5 +125,5 @@ double playing_audio_pts(sh_audio_t *sh_
 			 ao_functions_t *audio_out);
 void exit_player_with_rc(const char* how, int rc);
 void rm_osd_msg(int id);
-void add_subtitles(char *filename, float fps, int silent);
+void add_subtitles(char *filename, float fps, int noerr);
 int reinit_video_chain(void);

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	(original)
+++ trunk/mplayer.c	Tue Dec  4 13:34:44 2007
@@ -926,7 +926,7 @@ int playtree_add_playlist(play_tree_t* e
   return PT_NEXT_SRC;
 }
 
-void add_subtitles(char *filename, float fps, int silent)
+void add_subtitles(char *filename, float fps, int noerr)
 {
     sub_data *subd;
 #ifdef USE_ASS
@@ -948,11 +948,11 @@ void add_subtitles(char *filename, float
     if (ass_enabled && subd && !asst)
         asst = ass_read_subdata(ass_library, subd, fps);
 
-    if (!asst && !subd && !silent)
+    if (!asst && !subd)
 #else
-    if(!subd && !silent) 
+    if(!subd) 
 #endif
-        mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_CantLoadSub,
+        mp_msg(MSGT_CPLAYER, noerr ? MSGL_WARN : MSGL_ERR, MSGTR_CantLoadSub,
 		filename_recode(filename));
     
 #ifdef USE_ASS
@@ -3158,7 +3158,7 @@ if(mpctx->sh_video) {
     int i = 0;
     free(psub); // release the buffer created by get_path() above
     while (tmp[i]) {
-        add_subtitles (tmp[i], mpctx->sh_video->fps, 0);
+        add_subtitles (tmp[i], mpctx->sh_video->fps, 1);
         free(tmp[i++]);
     }
     free(tmp);



More information about the MPlayer-cvslog mailing list