# HG changeset patch # User arpi # Date 1043710916 0 # Node ID 7a06258271d6922a69e7d635028ba975c36c3c38 # Parent 61ec44e2f406a8dff76ccd202dadd26a40af8333 Add a command line option (-sub-no-text-pp) to disable subtitles postprocessing, ie. { } removal etc. patch by Salvador Eduardo Tropea diff -r 61ec44e2f406 -r 7a06258271d6 DOCS/mplayer.1 --- a/DOCS/mplayer.1 Mon Jan 27 22:29:47 2003 +0000 +++ b/DOCS/mplayer.1 Mon Jan 27 23:41:56 2003 +0000 @@ -1040,6 +1040,10 @@ .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 Specify the VobSub files that are to be used for subtitle. This is the full pathname without extensions, i.e.\& without the '.idx', diff -r 61ec44e2f406 -r 7a06258271d6 cfg-common.h --- a/cfg-common.h Mon Jan 27 22:29:47 2003 +0000 +++ b/cfg-common.h Mon Jan 27 23:41:56 2003 +0000 @@ -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 -r 61ec44e2f406 -r 7a06258271d6 subreader.c --- a/subreader.c Mon Jan 27 22:29:47 2003 +0000 +++ b/subreader.c Mon Jan 27 23:41:56 2003 +0000 @@ -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; diff -r 61ec44e2f406 -r 7a06258271d6 subreader.h --- a/subreader.h Mon Jan 27 22:29:47 2003 +0000 +++ b/subreader.h Mon Jan 27 23:41:56 2003 +0000 @@ -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