Commit 8c372e61 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Subsdec: various fixes for broken subtitles

Close #7553
(cherry picked from commit 26015dacd88f21d48bdebeb499dc8f331baacc19)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 920ca4e7
......@@ -661,6 +661,10 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
HtmlCopy( &psz_html, &psz_subtitle, "<font " );
strcat( psz_tag, "f" );
/* <font color= */
while (*psz_subtitle == ' ')
psz_subtitle++;
while( *psz_subtitle != '>' )
{
int k;
......@@ -675,6 +679,10 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
HtmlPut( &psz_html, psz_attribs[k] );
psz_subtitle += i_len;
/* <font color= red */
while (*psz_subtitle == ' ')
psz_subtitle++;
/* */
if( *psz_subtitle == '"' )
{
......@@ -712,15 +720,16 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
}
/* Not a tag, something else we do not understand */
if( i_len == 0 )
*psz_subtitle++;
psz_subtitle++;
psz_subtitle += i_len;
}
while (*psz_subtitle == ' ')
*psz_html++ = *psz_subtitle++;
}
*psz_html++ = '>';
*psz_subtitle++;
psz_subtitle++;
}
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