/* Remove formatting from string */
p_spu->p_region->psz_text = StripTags( psz_subtitle );
- p_spu->p_region->psz_html = CreateHtmlSubtitle( psz_subtitle );
+ if( var_CreateGetBool( p_dec, "subsdec-formatted" ) )
+ {
+ p_spu->p_region->psz_html = CreateHtmlSubtitle( psz_subtitle );
+ }
p_spu->i_start = p_block->i_pts;
p_spu->i_stop = p_block->i_pts + p_block->i_length;
p_sys->i_align );
if( p_text_region )
+ {
p_text_region->psz_text = CreatePlainText( p_text_region->psz_html );
+ if( ! var_CreateGetBool( p_dec, "subsdec-formatted" ) )
+ {
+ free( p_text_region->psz_html );
+ p_text_region->psz_html = NULL;
+ }
+ }
+
if( !p_region_first )
{
p_region_first = p_region_upto = p_text_region;
psz_end - psz_subtitle,
p_sys->i_align );
+ if( p_text_region )
+ {
+ if( ! var_CreateGetBool( p_dec, "subsdec-formatted" ) )
+ {
+ free( p_text_region->psz_html );
+ p_text_region->psz_html = NULL;
+ }
+ }
if( !p_region_first )
{
p_region_first = p_region_upto = p_text_region;