Commit a8d8ce84 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Text Renderers: move to text_segment

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 337ac422
......@@ -923,11 +923,11 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out,
return VLC_EGENERIC;
if( b_html && !p_region_in->psz_html )
return VLC_EGENERIC;
if( !b_html && !p_region_in->psz_text )
if( !b_html && !p_region_in->p_text && !p_region_in->p_text->psz_text )
return VLC_EGENERIC;
const size_t i_text_max = strlen( b_html ? p_region_in->psz_html
: p_region_in->psz_text );
: p_region_in->p_text->psz_text );
uni_char_t *psz_text = calloc( i_text_max, sizeof( *psz_text ) );
text_style_t **pp_styles = calloc( i_text_max, sizeof( *pp_styles ) );
......@@ -1041,7 +1041,7 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out,
psz_text,
pp_styles,
NULL,
p_region_in->psz_text, p_style, 0 );
p_region_in->p_text->psz_text, p_style, 0 );
}
if( !rv && i_text_length > 0 )
......
......@@ -435,7 +435,8 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
/* Sanity check */
if( !p_region_in || !p_region_out ) return VLC_EGENERIC;
psz_string = p_region_in->psz_text;
if( !p_region_in->p_text ) return VLC_EGENERIC;
psz_string = p_region_in->p_text->psz_text;
if( !psz_string || !*psz_string ) return VLC_EGENERIC;
p_svg = malloc( sizeof( svg_rendition_t ) );
......
......@@ -311,10 +311,11 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
/* Sanity check */
if( !p_region_in || !p_region_out ) return VLC_EGENERIC;
if( !p_region_in->psz_text || !*p_region_in->psz_text )
if( !p_region_in->p_text ) return VLC_EGENERIC;
if( !p_region_in->p_text->psz_text || !*p_region_in->p_text->psz_text )
return VLC_EGENERIC;
psz_string = ToT(p_region_in->psz_text);
psz_string = ToT(p_region_in->p_text->psz_text);
if( psz_string == NULL )
return VLC_EGENERIC;
if( !*psz_string )
......
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