/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <stdlib.h> /* malloc( ), free( ) */
-#include <string.h>
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
#include <vlc_charset.h>
#include <vlc_vout.h>
#include <vlc_osd.h>
set_category( SUBCAT_INPUT_SCODEC );
set_capability( "text renderer", 99 );
add_shortcut( "svg" );
- add_string( "svg-template-file", "", NULL, TEMPLATE_TEXT, TEMPLATE_LONGTEXT, VLC_TRUE );
+ add_string( "svg-template-file", "", NULL, TEMPLATE_TEXT, TEMPLATE_LONGTEXT, true );
set_callbacks( Create, Destroy );
vlc_module_end();
else
{
struct stat s;
- int i_ret;
- i_ret = utf8_stat( psz_filename, &s );
- if( i_ret )
+ if( fstat( fileno( file ), &s ) )
{
/* Problem accessing file information. Should not
happen as we could open it. */
rsvg_handle_set_size_callback( p_handle, svg_SizeCallback, p_filter, NULL );
if( ! rsvg_handle_write( p_handle,
- ( guchar* )p_svg->psz_text, strlen( p_svg->psz_text ),
- &error ) )
+ ( guchar* )p_svg->psz_text, strlen( p_svg->psz_text ),
+ &error ) )
{
msg_Err( p_filter, "error while rendering SVG: %s\n", error->message );
g_object_unref( G_OBJECT( p_handle ) );
static void FreeString( svg_rendition_t *p_svg )
{
- if( p_svg->psz_text )
- free( p_svg->psz_text );
+ free( p_svg->psz_text );
/* p_svg->p_rendition is a GdkPixbuf, and its allocation is
managed through ref. counting */
if( p_svg->p_rendition )