]> git.sesse.net Git - vlc/blobdiff - modules/misc/svg.c
Add a global documentation for all the Lua modules.
[vlc] / modules / misc / svg.c
index 7669dc5e13f5728af33d5ff81803c314c8a31bd1..9d024a614a2dc8a1053704ee78820b11a41324d9 100644 (file)
@@ -29,7 +29,8 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_charset.h>
 #include <vlc_vout.h>
 #include <vlc_osd.h>
@@ -75,7 +76,7 @@ vlc_module_begin();
  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();
 
@@ -183,10 +184,8 @@ static char *svg_GetTemplate( vlc_object_t *p_this )
         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. */
@@ -507,8 +506,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
 
 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 )