[vlc-commits] subsusf: move subsdec-formatted option to correct plugin

Rémi Denis-Courmont git at videolan.org
Sat Aug 22 09:38:14 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 22 10:37:49 2015 +0300| [b83a2c56006a7e66f7f1a766f2c75366f375c872] | committer: Rémi Denis-Courmont

subsusf: move subsdec-formatted option to correct plugin

(Maybe the option should be renamed also)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b83a2c56006a7e66f7f1a766f2c75366f375c872
---

 modules/codec/subsdec.c |    9 +--------
 modules/codec/subsusf.c |    7 ++++++-
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/modules/codec/subsdec.c b/modules/codec/subsdec.c
index fed0325..842635d 100644
--- a/modules/codec/subsdec.c
+++ b/modules/codec/subsdec.c
@@ -348,9 +348,6 @@ static const char *const ppsz_justification_text[] = {
 #define AUTODETECT_UTF8_TEXT N_("UTF-8 subtitle autodetection")
 #define AUTODETECT_UTF8_LONGTEXT N_("This enables automatic detection of " \
             "UTF-8 encoding within subtitle files.")
-#define FORMAT_TEXT N_("Formatted Subtitles")
-#define FORMAT_LONGTEXT N_("Some subtitle formats allow for text formatting. " \
- "VLC partly implements this, but you can choose to disable all formatting.")
 
 static int  OpenDecoder   ( vlc_object_t * );
 static void CloseDecoder  ( vlc_object_t * );
@@ -371,8 +368,6 @@ vlc_module_begin ()
         change_string_list( ppsz_encodings, ppsz_encoding_names )
     add_bool( "subsdec-autodetect-utf8", true,
               AUTODETECT_UTF8_TEXT, AUTODETECT_UTF8_LONGTEXT, false )
-    add_bool( "subsdec-formatted", true, FORMAT_TEXT, FORMAT_LONGTEXT,
-                 false )
 vlc_module_end ()
 
 /*****************************************************************************
@@ -638,10 +633,8 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block )
 
     p_spu_sys->align = SUBPICTURE_ALIGN_BOTTOM | p_sys->i_align;
     p_spu_sys->p_segments = ParseSubtitles( &p_spu_sys->align, psz_subtitle );
-    free( psz_subtitle );
 
-    //FIXME: Remove the variable?
-    //if( var_InheritBool( p_dec, "subsdec-formatted" ) )
+    free( psz_subtitle );
 
     return p_spu;
 }
diff --git a/modules/codec/subsusf.c b/modules/codec/subsusf.c
index 5e9cce5..8968fcb 100644
--- a/modules/codec/subsusf.c
+++ b/modules/codec/subsusf.c
@@ -41,6 +41,10 @@
 static int  OpenDecoder   ( vlc_object_t * );
 static void CloseDecoder  ( vlc_object_t * );
 
+#define FORMAT_TEXT N_("Formatted Subtitles")
+#define FORMAT_LONGTEXT N_("Some subtitle formats allow for text formatting. " \
+ "VLC partly implements this, but you can choose to disable all formatting.")
+
 vlc_module_begin ()
     set_capability( "decoder", 40 )
     set_shortname( N_("USFSubs"))
@@ -48,7 +52,8 @@ vlc_module_begin ()
     set_callbacks( OpenDecoder, CloseDecoder )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_SCODEC )
-    /* We inherit subsdec-align and subsdec-formatted from subsdec.c */
+    add_bool( "subsdec-formatted", true, FORMAT_TEXT, FORMAT_LONGTEXT,
+                 false )
 vlc_module_end ()
 
 



More information about the vlc-commits mailing list