[vlc-devel] commit: Subsdec: initial support for <s> tag (Jean-Baptiste Kempf )
git version control
git at videolan.org
Wed Dec 30 02:14:52 CET 2009
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Dec 30 02:01:45 2009 +0100| [0e46b87488382c4dda34ac295b198b8041c0742d] | committer: Jean-Baptiste Kempf
Subsdec: initial support for <s> tag
We don't have the renderer for it, so far.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0e46b87488382c4dda34ac295b198b8041c0742d
---
modules/codec/subtitles/subsdec.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/modules/codec/subtitles/subsdec.c b/modules/codec/subtitles/subsdec.c
index f6af33c..a95218e 100644
--- a/modules/codec/subtitles/subsdec.c
+++ b/modules/codec/subtitles/subsdec.c
@@ -634,7 +634,7 @@ static char *StripTags( char *psz_subtitle )
* to be carrying style information. Over time people have used them that way.
* In the absence of specifications from which to work, the tags supported
* have been restricted to the simple set permitted by the USF DTD, ie. :
- * Basic: <br>, <i>, <b>, <u>
+ * Basic: <br>, <i>, <b>, <u>, <s>
* Extended: <font>
* Attributes: face
* family
@@ -728,6 +728,11 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
HtmlCopy( &psz_html, &psz_subtitle, "<u>" );
strcat( psz_tag, "u" );
}
+ else if( !strncasecmp( psz_subtitle, "<s>", 3 ) )
+ {
+ HtmlCopy( &psz_html, &psz_subtitle, "<s>" );
+ strcat( psz_tag, "s" );
+ }
else if( !strncasecmp( psz_subtitle, "<font ", 6 ))
{
const char *psz_attribs[] = { "face=", "family=", "size=",
@@ -813,6 +818,10 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
b_match = !strncasecmp( psz_subtitle, "</u>", 4 );
i_len = 4;
break;
+ case 's':
+ b_match = !strncasecmp( psz_subtitle, "</s>", 4 );
+ i_len = 4;
+ break;
case 'f':
b_match = !strncasecmp( psz_subtitle, "</font>", 7 );
i_len = 7;
@@ -1000,6 +1009,9 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
case 'u':
HtmlPut( &psz_html, "</u>" );
break;
+ case 's':
+ HtmlPut( &psz_html, "</s>" );
+ break;
case 'f':
HtmlPut( &psz_html, "/font>" );
break;
More information about the vlc-devel
mailing list