[Mplayer-cvslog] CVS: main cfg-common.h,1.81,1.82 subreader.c,1.93,1.94 subreader.h,1.24,1.25

Arpi of Ize arpi at mplayerhq.hu
Tue Jan 28 00:41:59 CET 2003


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv13863

Modified Files:
	cfg-common.h subreader.c subreader.h 
Log Message:
Add a command line option (-sub-no-text-pp) to disable subtitles
postprocessing, ie. { } removal etc.
patch by Salvador Eduardo Tropea <salvador at inti.gov.ar>


Index: cfg-common.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-common.h,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- cfg-common.h	24 Jan 2003 10:24:07 -0000	1.81
+++ cfg-common.h	27 Jan 2003 23:41:38 -0000	1.82
@@ -185,6 +185,7 @@
 	{"nooverlapsub", &suboverlap_enabled, CONF_TYPE_FLAG, 0, 0, 0, NULL},
 	{"sub-bg-color", &sub_bg_color, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
 	{"sub-bg-alpha", &sub_bg_alpha, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
+	{"sub-no-text-pp", &sub_no_text_pp, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 #endif
 #ifdef USE_OSD
 	{"font", &font_name, CONF_TYPE_STRING, 0, 0, 0, NULL},

Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- subreader.c	21 Jan 2003 19:12:34 -0000	1.93
+++ subreader.c	27 Jan 2003 23:41:38 -0000	1.94
@@ -32,6 +32,8 @@
 int sub_errs=0;
 int sub_num=0;          // number of subtitle structs
 int sub_slacktime=2000; // 20 seconds
+int sub_no_text_pp=0;   // 1 => do not apply text post-processing
+                        // like {\...} elimination in SSA format.
 
 /* Use the SUB_* constant defined in the header file */
 int sub_format=SUB_INVALID;
@@ -1132,7 +1134,7 @@
 	  return NULL; 
 	 }
         // Apply any post processing that needs recoding first
-        if ((sub!=ERR) && srp->post) srp->post(sub);
+        if ((sub!=ERR) && !sub_no_text_pp && srp->post) srp->post(sub);
 #ifdef USE_SORTSUB
 	if(!sub_num || (first[sub_num - 1].start <= sub->start)){
 	    first[sub_num].start = sub->start;

Index: subreader.h
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- subreader.h	3 Jan 2003 12:26:15 -0000	1.24
+++ subreader.h	27 Jan 2003 23:41:38 -0000	1.25
@@ -5,6 +5,7 @@
 extern int sub_errs;
 extern int sub_num;         // number of subtitle structs
 extern int suboverlap_enabled;
+extern int sub_no_text_pp;  // disable text post-processing
 
 // subtitle formats
 #define SUB_INVALID   -1



More information about the MPlayer-cvslog mailing list