/*****************************************************************************
- * subsdec.c : text subtitles decoder
+ * subsdec.c : text subtitle decoder
*****************************************************************************
* Copyright (C) 2000-2006 VLC authors and VideoLAN
* $Id$
static const char *const ppsz_justification_text[] = {
N_("Center"),N_("Left"),N_("Right")};
-#define ENCODING_TEXT N_("Subtitles text encoding")
+#define ENCODING_TEXT N_("Subtitle text encoding")
#define ENCODING_LONGTEXT N_("Set the encoding used in text subtitles")
-#define ALIGN_TEXT N_("Subtitles justification")
+#define ALIGN_TEXT N_("Subtitle justification")
#define ALIGN_LONGTEXT N_("Set the justification of subtitles")
-#define AUTODETECT_UTF8_TEXT N_("UTF-8 subtitles autodetection")
+#define AUTODETECT_UTF8_TEXT N_("UTF-8 subtitle autodetection")
#define AUTODETECT_UTF8_LONGTEXT N_("This enables automatic detection of " \
- "UTF-8 encoding within subtitles files.")
+ "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.")
vlc_module_begin ()
set_shortname( N_("Subtitles"))
- set_description( N_("Text subtitles decoder") )
+ set_description( N_("Text subtitle decoder") )
set_capability( "decoder", 50 )
set_callbacks( OpenDecoder, CloseDecoder )
set_category( CAT_INPUT )
HtmlCopy( &psz_html, &psz_subtitle, "<font " );
HtmlPut( &psz_tag, "f" );
- /* <font color= */
- while (*psz_subtitle == ' ')
- psz_subtitle++;
-
while( *psz_subtitle != '>' )
{
int k;
+ /* <font color= */
+ while (*psz_subtitle == ' ')
+ psz_subtitle++;
+
for( k=0; psz_attribs[ k ]; k++ )
{
int i_len = strlen( psz_attribs[ k ] );
{
bool b_match = false;
bool b_ignore = false;
- int i_len = strlen( psz_tag ) - 1;
+ int i_len = (psz_tag ? strlen(psz_tag) : 0) - 1;
char *psz_lastTag = NULL;
if( i_len >= 0 )
}
}
- while( *psz_tag )
+ while( psz_tag && *psz_tag )
{
/* */
char *psz_last = &psz_tag[strlen(psz_tag)-1];