Commit 26015dac authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Subsdec: various fixes for broken subtitles

Close #7553
parent 64e30497
...@@ -648,6 +648,10 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle ) ...@@ -648,6 +648,10 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
HtmlCopy( &psz_html, &psz_subtitle, "<font " ); HtmlCopy( &psz_html, &psz_subtitle, "<font " );
strcat( psz_tag, "f" ); strcat( psz_tag, "f" );
/* <font color= */
while (*psz_subtitle == ' ')
psz_subtitle++;
while( *psz_subtitle != '>' ) while( *psz_subtitle != '>' )
{ {
int k; int k;
...@@ -662,6 +666,10 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle ) ...@@ -662,6 +666,10 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
HtmlPut( &psz_html, psz_attribs[k] ); HtmlPut( &psz_html, psz_attribs[k] );
psz_subtitle += i_len; psz_subtitle += i_len;
/* <font color= red */
while (*psz_subtitle == ' ')
psz_subtitle++;
/* */ /* */
if( *psz_subtitle == '"' ) if( *psz_subtitle == '"' )
{ {
...@@ -699,15 +707,16 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle ) ...@@ -699,15 +707,16 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
} }
/* Not a tag, something else we do not understand */ /* Not a tag, something else we do not understand */
if( i_len == 0 ) if( i_len == 0 )
*psz_subtitle++; psz_subtitle++;
psz_subtitle += i_len; psz_subtitle += i_len;
} }
while (*psz_subtitle == ' ') while (*psz_subtitle == ' ')
*psz_html++ = *psz_subtitle++; *psz_html++ = *psz_subtitle++;
} }
*psz_html++ = '>'; *psz_html++ = '>';
*psz_subtitle++; psz_subtitle++;
} }
else if( !strncmp( psz_subtitle, "</", 2 )) else if( !strncmp( psz_subtitle, "</", 2 ))
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment