summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-27 23:41:56 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-27 23:41:56 +0000
commit09e742fe2f0ac10a625287b9f5465922fa723833 (patch)
treef06cfd9e2305ef475d013392be3d953e9d01051d
parent16e91ecd0806e698bb9a2e09945728fed8d2ec40 (diff)
downloadmpv-09e742fe2f0ac10a625287b9f5465922fa723833.tar.bz2
mpv-09e742fe2f0ac10a625287b9f5465922fa723833.tar.xz
Add a command line option (-sub-no-text-pp) to disable subtitles
postprocessing, ie. { } removal etc. patch by Salvador Eduardo Tropea <salvador@inti.gov.ar> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9127 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--DOCS/mplayer.14
-rw-r--r--cfg-common.h1
-rw-r--r--subreader.c4
-rw-r--r--subreader.h1
4 files changed, 9 insertions, 1 deletions
diff --git a/DOCS/mplayer.1 b/DOCS/mplayer.1
index aecfc5e8f4..abb14cb9ae 100644
--- a/DOCS/mplayer.1
+++ b/DOCS/mplayer.1
@@ -1040,6 +1040,10 @@ Tells MPlayer to handle the subtitle file as UNICODE.
.B \-utf8 \ \
Tells MPlayer to handle the subtitle file as UTF8.
.TP
+.B \-sub-no-text-pp
+Disables any kind of text post processing done after loading the subtitles.
+Used for debug purposes.
+.TP
.B \-vobsub <vobsub\ file\ without\ extension>
Specify the VobSub files that are to be used for subtitle.
This is the full pathname without extensions, i.e.\& without the '.idx',
diff --git a/cfg-common.h b/cfg-common.h
index 47024b6aea..d668a26096 100644
--- a/cfg-common.h
+++ b/cfg-common.h
@@ -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},
diff --git a/subreader.c b/subreader.c
index 5f72cace66..35bb69a9be 100644
--- a/subreader.c
+++ b/subreader.c
@@ -32,6 +32,8 @@ int sub_uses_time=0;
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 @@ subtitle* sub_read_file (char *filename, float fps) {
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;
diff --git a/subreader.h b/subreader.h
index 4022d4fc8a..f3ef2e4c4e 100644
--- a/subreader.h
+++ b/subreader.h
@@ -5,6 +5,7 @@ extern int sub_uses_time;
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