"for automatic string conversion" )
vlc_module_begin ()
- set_category( CAT_INPUT)
- set_category( SUBCAT_INPUT_SCODEC )
- set_capability( "text renderer", 99 )
- add_shortcut( "svg" )
- add_string( "svg-template-file", "", NULL, TEMPLATE_TEXT, TEMPLATE_LONGTEXT, true )
- set_callbacks( Create, Destroy )
+ set_category( CAT_INPUT )
+ set_category( SUBCAT_INPUT_SCODEC )
+ set_capability( "text renderer", 99 )
+ add_shortcut( "svg" )
+ add_string( "svg-template-file", "", NULL, TEMPLATE_TEXT, TEMPLATE_LONGTEXT, true )
+ set_callbacks( Create, Destroy )
vlc_module_end ()
/**
/* Default size for rendering. Initialized to the output size. */
int i_width;
int i_height;
- vlc_mutex_t *lock;
};
/*****************************************************************************
msg_Dbg( p_this, "reading %ld bytes from template %s",
(unsigned long)s.st_size, psz_filename );
- psz_template = malloc( ( s.st_size + 42 ) * sizeof( char ) );
+ psz_template = malloc( s.st_size + 42 );
if( !psz_template )
{
fclose( file );
( guchar* )p_svg->psz_text, strlen( p_svg->psz_text ),
&error ) )
{
- msg_Err( p_filter, "error while rendering SVG: %s\n", error->message );
+ msg_Err( p_filter, "error while rendering SVG: %s", error->message );
g_object_unref( G_OBJECT( p_handle ) );
return;
}
if( ! rsvg_handle_close( p_handle, &error ) )
{
- msg_Err( p_filter, "error while rendering SVG (close): %s\n", error->message );
+ msg_Err( p_filter, "error while rendering SVG (close): %s", error->message );
g_object_unref( G_OBJECT( p_handle ) );
return;
}
psz_string = p_region_in->psz_text;
if( !psz_string || !*psz_string ) return VLC_EGENERIC;
- p_svg = ( svg_rendition_t * )malloc( sizeof( svg_rendition_t ) );
+ p_svg = malloc( sizeof( svg_rendition_t ) );
if( !p_svg )
return VLC_ENOMEM;
int length;
char* psz_template = p_sys->psz_template;
length = strlen( psz_string ) + strlen( psz_template ) + 42;
- p_svg->psz_text = malloc( ( length + 1 ) * sizeof( char ) );
+ p_svg->psz_text = malloc( length + 1 );
if( !p_svg->psz_text )
{
free( p_svg );