Commit 1605af57 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Subsdec: remove trailing spaces.

parent 62b68c2c
...@@ -656,7 +656,7 @@ static void SetupPositions( subpicture_region_t *p_region, char *psz_subtitle ) ...@@ -656,7 +656,7 @@ static void SetupPositions( subpicture_region_t *p_region, char *psz_subtitle )
if( i_mask & ATTRIBUTE_ALIGNMENT ) if( i_mask & ATTRIBUTE_ALIGNMENT )
p_region->i_align = i_align; p_region->i_align = i_align;
/* TODO: Setup % based offsets properly, without adversely affecting /* TODO: Setup % based offsets properly, without adversely affecting
* everything else in vlc. Will address with separate patch, to * everything else in vlc. Will address with separate patch, to
* prevent this one being any more complicated. * prevent this one being any more complicated.
...@@ -731,7 +731,7 @@ static subpicture_region_t *CreateTextRegion( decoder_t *p_dec, ...@@ -731,7 +731,7 @@ static subpicture_region_t *CreateTextRegion( decoder_t *p_dec,
*/ */
p_text_region->i_x = p_style->i_margin_h; p_text_region->i_x = p_style->i_margin_h;
p_text_region->i_y = p_style->i_margin_v; p_text_region->i_y = p_style->i_margin_v;
} }
else else
{ {
...@@ -743,7 +743,7 @@ static subpicture_region_t *CreateTextRegion( decoder_t *p_dec, ...@@ -743,7 +743,7 @@ static subpicture_region_t *CreateTextRegion( decoder_t *p_dec,
* defaults. * defaults.
*/ */
SetupPositions( p_text_region, psz_subtitle ); SetupPositions( p_text_region, psz_subtitle );
p_text_region->p_next = NULL; p_text_region->p_next = NULL;
} }
return p_text_region; return p_text_region;
...@@ -766,7 +766,7 @@ static subpicture_region_t *ParseUSFString( decoder_t *p_dec, char *psz_subtitle ...@@ -766,7 +766,7 @@ static subpicture_region_t *ParseUSFString( decoder_t *p_dec, char *psz_subtitle
( !strncasecmp( psz_subtitle, "<text>", 6 ))) ( !strncasecmp( psz_subtitle, "<text>", 6 )))
{ {
psz_end = strcasestr( psz_subtitle, "</text>" ); psz_end = strcasestr( psz_subtitle, "</text>" );
if( psz_end ) if( psz_end )
{ {
subpicture_region_t *p_text_region; subpicture_region_t *p_text_region;
...@@ -778,7 +778,7 @@ static subpicture_region_t *ParseUSFString( decoder_t *p_dec, char *psz_subtitle ...@@ -778,7 +778,7 @@ static subpicture_region_t *ParseUSFString( decoder_t *p_dec, char *psz_subtitle
psz_subtitle, psz_subtitle,
psz_end - psz_subtitle, psz_end - psz_subtitle,
p_sys->i_align ); p_sys->i_align );
if( p_text_region ) if( p_text_region )
{ {
p_text_region->psz_text = CreatePlainText( p_text_region->psz_html ); p_text_region->psz_text = CreatePlainText( p_text_region->psz_html );
...@@ -805,7 +805,7 @@ static subpicture_region_t *ParseUSFString( decoder_t *p_dec, char *psz_subtitle ...@@ -805,7 +805,7 @@ static subpicture_region_t *ParseUSFString( decoder_t *p_dec, char *psz_subtitle
( !strncasecmp( psz_subtitle, "<karaoke>", 9 ))) ( !strncasecmp( psz_subtitle, "<karaoke>", 9 )))
{ {
psz_end = strcasestr( psz_subtitle, "</karaoke>" ); psz_end = strcasestr( psz_subtitle, "</karaoke>" );
if( psz_end ) if( psz_end )
{ {
subpicture_region_t *p_text_region; subpicture_region_t *p_text_region;
...@@ -817,7 +817,7 @@ static subpicture_region_t *ParseUSFString( decoder_t *p_dec, char *psz_subtitle ...@@ -817,7 +817,7 @@ static subpicture_region_t *ParseUSFString( decoder_t *p_dec, char *psz_subtitle
psz_subtitle, psz_subtitle,
psz_end - psz_subtitle, psz_end - psz_subtitle,
p_sys->i_align ); p_sys->i_align );
if( p_text_region ) if( p_text_region )
{ {
if( ! var_CreateGetBool( p_dec, "subsdec-formatted" ) ) if( ! var_CreateGetBool( p_dec, "subsdec-formatted" ) )
...@@ -845,7 +845,7 @@ static subpicture_region_t *ParseUSFString( decoder_t *p_dec, char *psz_subtitle ...@@ -845,7 +845,7 @@ static subpicture_region_t *ParseUSFString( decoder_t *p_dec, char *psz_subtitle
char *psz_end = strcasestr( psz_subtitle, "</image>" ); char *psz_end = strcasestr( psz_subtitle, "</image>" );
char *psz_content = strchr( psz_subtitle, '>' ); char *psz_content = strchr( psz_subtitle, '>' );
int i_transparent = -1; int i_transparent = -1;
/* If a colorkey parameter is specified, then we have to map /* If a colorkey parameter is specified, then we have to map
* that index in the picture through as transparent (it is * that index in the picture through as transparent (it is
* required by the USF spec but is also recommended that if the * required by the USF spec but is also recommended that if the
...@@ -895,7 +895,7 @@ static subpicture_region_t *ParseUSFString( decoder_t *p_dec, char *psz_subtitle ...@@ -895,7 +895,7 @@ static subpicture_region_t *ParseUSFString( decoder_t *p_dec, char *psz_subtitle
} }
if( psz_end ) if( psz_end )
psz_subtitle = psz_end - 1; psz_subtitle = psz_end - 1;
psz_subtitle += strcspn( psz_subtitle, ">" ); psz_subtitle += strcspn( psz_subtitle, ">" );
} }
...@@ -1013,7 +1013,7 @@ static void ParseSSAString( decoder_t *p_dec, char *psz_subtitle, subpicture_t * ...@@ -1013,7 +1013,7 @@ static void ParseSSAString( decoder_t *p_dec, char *psz_subtitle, subpicture_t *
{ {
p_spu->i_x = (i_margin_l) ? i_margin_l : p_style->i_margin_h; p_spu->i_x = (i_margin_l) ? i_margin_l : p_style->i_margin_h;
} }
else if( p_style->i_align & SUBPICTURE_ALIGN_RIGHT ) else if( p_style->i_align & SUBPICTURE_ALIGN_RIGHT )
{ {
p_spu->i_x = (i_margin_r) ? i_margin_r : p_style->i_margin_h; p_spu->i_x = (i_margin_r) ? i_margin_r : p_style->i_margin_h;
} }
...@@ -1118,7 +1118,7 @@ static int ParseImageAttachments( decoder_t *p_dec ) ...@@ -1118,7 +1118,7 @@ static int ParseImageAttachments( decoder_t *p_dec )
if( p_image != NULL ) if( p_image != NULL )
{ {
block_t *p_block; block_t *p_block;
p_block = block_New( p_image->p_parent, p_attach->i_data ); p_block = block_New( p_image->p_parent, p_attach->i_data );
if( p_block != NULL ) if( p_block != NULL )
...@@ -1168,7 +1168,7 @@ static int ParseImageAttachments( decoder_t *p_dec ) ...@@ -1168,7 +1168,7 @@ static int ParseImageAttachments( decoder_t *p_dec )
} }
vlc_input_attachment_Delete( pp_attachments[ k ] ); vlc_input_attachment_Delete( pp_attachments[ k ] );
} }
free( pp_attachments ); free( pp_attachments );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -1230,7 +1230,7 @@ static void ParseUSFHeaderTags( decoder_t *p_dec, xml_reader_t *p_xml_reader ) ...@@ -1230,7 +1230,7 @@ static void ParseUSFHeaderTags( decoder_t *p_dec, xml_reader_t *p_xml_reader )
break; break;
case XML_READER_ENDELEM: case XML_READER_ENDELEM:
psz_node = xml_ReaderName( p_xml_reader ); psz_node = xml_ReaderName( p_xml_reader );
if( !psz_node ) if( !psz_node )
break; break;
switch (i_style_level) switch (i_style_level)
...@@ -1257,7 +1257,7 @@ static void ParseUSFHeaderTags( decoder_t *p_dec, xml_reader_t *p_xml_reader ) ...@@ -1257,7 +1257,7 @@ static void ParseUSFHeaderTags( decoder_t *p_dec, xml_reader_t *p_xml_reader )
} }
break; break;
} }
free( psz_node ); free( psz_node );
break; break;
case XML_READER_STARTELEM: case XML_READER_STARTELEM:
...@@ -1304,7 +1304,7 @@ static void ParseUSFHeaderTags( decoder_t *p_dec, xml_reader_t *p_xml_reader ) ...@@ -1304,7 +1304,7 @@ static void ParseUSFHeaderTags( decoder_t *p_dec, xml_reader_t *p_xml_reader )
break; break;
} }
/* All styles are supposed to default to Default, and then /* All styles are supposed to default to Default, and then
* one or more settings are over-ridden. * one or more settings are over-ridden.
* At the moment this only effects styles defined AFTER * At the moment this only effects styles defined AFTER
* Default in the XML * Default in the XML
*/ */
...@@ -1403,11 +1403,11 @@ static void ParseUSFHeaderTags( decoder_t *p_dec, xml_reader_t *p_xml_reader ) ...@@ -1403,11 +1403,11 @@ static void ParseUSFHeaderTags( decoder_t *p_dec, xml_reader_t *p_xml_reader )
p_style->font_style.i_outline_color = (col & 0x00ffffff); p_style->font_style.i_outline_color = (col & 0x00ffffff);
p_style->font_style.i_outline_alpha = (col >> 24) & 0xff; p_style->font_style.i_outline_alpha = (col >> 24) & 0xff;
} }
} }
else if( !strcasecmp( "outline-level", psz_name ) ) else if( !strcasecmp( "outline-level", psz_name ) )
{ {
p_style->font_style.i_outline_width = atoi( psz_value ); p_style->font_style.i_outline_width = atoi( psz_value );
} }
else if( !strcasecmp( "shadow-color", psz_name ) ) else if( !strcasecmp( "shadow-color", psz_name ) )
{ {
if( *psz_value == '#' ) if( *psz_value == '#' )
...@@ -1420,7 +1420,7 @@ static void ParseUSFHeaderTags( decoder_t *p_dec, xml_reader_t *p_xml_reader ) ...@@ -1420,7 +1420,7 @@ static void ParseUSFHeaderTags( decoder_t *p_dec, xml_reader_t *p_xml_reader )
else if( !strcasecmp( "shadow-level", psz_name ) ) else if( !strcasecmp( "shadow-level", psz_name ) )
{ {
p_style->font_style.i_shadow_width = atoi( psz_value ); p_style->font_style.i_shadow_width = atoi( psz_value );
} }
else if( !strcasecmp( "back-color", psz_name ) ) else if( !strcasecmp( "back-color", psz_name ) )
{ {
if( *psz_value == '#' ) if( *psz_value == '#' )
...@@ -1433,7 +1433,7 @@ static void ParseUSFHeaderTags( decoder_t *p_dec, xml_reader_t *p_xml_reader ) ...@@ -1433,7 +1433,7 @@ static void ParseUSFHeaderTags( decoder_t *p_dec, xml_reader_t *p_xml_reader )
else if( !strcasecmp( "spacing", psz_name ) ) else if( !strcasecmp( "spacing", psz_name ) )
{ {
p_style->font_style.i_spacing = atoi( psz_value ); p_style->font_style.i_spacing = atoi( psz_value );
} }
} }
if( psz_name ) free( psz_name ); if( psz_name ) free( psz_name );
if( psz_value ) free( psz_value ); if( psz_value ) free( psz_value );
...@@ -1500,7 +1500,7 @@ static void ParseUSFHeaderTags( decoder_t *p_dec, xml_reader_t *p_xml_reader ) ...@@ -1500,7 +1500,7 @@ static void ParseUSFHeaderTags( decoder_t *p_dec, xml_reader_t *p_xml_reader )
if( psz_value ) free( psz_value ); if( psz_value ) free( psz_value );
} }
} }
free( psz_node ); free( psz_node );
break; break;
} }
...@@ -1596,7 +1596,7 @@ static void ParseSSAHeader( decoder_t *p_dec ) ...@@ -1596,7 +1596,7 @@ static void ParseSSAHeader( decoder_t *p_dec )
if( i_align == 1 || i_align == 5 || i_align == 9 ) p_style->i_align |= SUBPICTURE_ALIGN_LEFT; if( i_align == 1 || i_align == 5 || i_align == 9 ) p_style->i_align |= SUBPICTURE_ALIGN_LEFT;
if( i_align == 3 || i_align == 7 || i_align == 11 ) p_style->i_align |= SUBPICTURE_ALIGN_RIGHT; if( i_align == 3 || i_align == 7 || i_align == 11 ) p_style->i_align |= SUBPICTURE_ALIGN_RIGHT;
if( i_align < 4 ) p_style->i_align |= SUBPICTURE_ALIGN_BOTTOM; if( i_align < 4 ) p_style->i_align |= SUBPICTURE_ALIGN_BOTTOM;
else if( i_align < 8 ) p_style->i_align |= SUBPICTURE_ALIGN_TOP; else if( i_align < 8 ) p_style->i_align |= SUBPICTURE_ALIGN_TOP;
p_style->i_margin_h = ( p_style->i_align & SUBPICTURE_ALIGN_RIGHT ) ? i_margin_r : i_margin_l; p_style->i_margin_h = ( p_style->i_align & SUBPICTURE_ALIGN_RIGHT ) ? i_margin_r : i_margin_l;
p_style->i_margin_v = i_margin_v; p_style->i_margin_v = i_margin_v;
...@@ -1843,7 +1843,7 @@ static char *CreateHtmlSubtitle( char *psz_subtitle ) ...@@ -1843,7 +1843,7 @@ static char *CreateHtmlSubtitle( char *psz_subtitle )
{ {
int i_len = strlen( psz_attribs[ k ] ); int i_len = strlen( psz_attribs[ k ] );
if( !strncasecmp( psz_subtitle, psz_attribs[ k ], i_len )) if( !strncasecmp( psz_subtitle, psz_attribs[ k ], i_len ))
{ {
i_len += strcspn( psz_subtitle + i_len, "\"" ) + 1; i_len += strcspn( psz_subtitle + i_len, "\"" ) + 1;
...@@ -2053,7 +2053,7 @@ static subpicture_region_t *LoadEmbeddedImage( decoder_t *p_dec, subpicture_t *p ...@@ -2053,7 +2053,7 @@ static subpicture_region_t *LoadEmbeddedImage( decoder_t *p_dec, subpicture_t *p
msg_Err( p_dec, "Unable to read image %s", psz_filename ); msg_Err( p_dec, "Unable to read image %s", psz_filename );
return NULL; return NULL;
} }
/* Display the feed's image */ /* Display the feed's image */
memset( &fmt_out, 0, sizeof( video_format_t)); memset( &fmt_out, 0, sizeof( video_format_t));
......
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