]> git.sesse.net Git - vlc/blobdiff - modules/access/vcdx/info.c
Fix previous commit.
[vlc] / modules / access / vcdx / info.c
index ca4a9ef89155f1793c958eac64a3f1cd509a7fcb..5d3d16f71b92532c028ed823f2e4e987c6241433 100644 (file)
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_input.h>
 #include <vlc_access.h>
 #include "vcd.h"
-#include <vlc_playlist.h>
 #include <vlc_keys.h>
 #include "info.h"
 
@@ -176,10 +175,11 @@ VCDMetaInfo( access_t *p_access, /*const*/ char *psz_mrl )
 
   if ( CDIO_INVALID_TRACK != i_track )
   {
+    char* psz_title_format = config_GetPsz( p_access, MODULE_STRING "-title-format" );
     char *psz_name =
-      VCDFormatStr( p_access, p_vcdplayer,
-            config_GetPsz( p_access, MODULE_STRING "-title-format" ),
-            psz_mrl, &(p_vcdplayer->play_item) );
+      VCDFormatStr( p_access, p_vcdplayer, psz_title_format, psz_mrl,
+                    &(p_vcdplayer->play_item) );
+    free( psz_title_format );
  
     input_Control( p_vcdplayer->p_input, INPUT_SET_NAME, psz_name );
   }
@@ -386,14 +386,14 @@ VCDUpdateTitle( access_t *p_access )
     if( psz_mrl )
     {
         char *psz_name;
-    snprintf(psz_mrl, psz_mrl_max, "%s%s",
-         VCD_MRL_PREFIX, p_vcdplayer->psz_source);
-    psz_name = VCDFormatStr( p_access, p_vcdplayer,
-                 config_GetPsz( p_access, MODULE_STRING
-                        "-title-format" ),
-                psz_mrl, &(p_vcdplayer->play_item) );
-    input_Control( p_vcdplayer->p_input, INPUT_SET_NAME, psz_name );
-    free(psz_mrl);
+        char* psz_title_format = config_GetPsz( p_access, MODULE_STRING "-title-format" );
+        snprintf( psz_mrl, psz_mrl_max, "%s%s",
+                  VCD_MRL_PREFIX, p_vcdplayer->psz_source );
+        psz_name = VCDFormatStr( p_access, p_vcdplayer, psz_title_format, psz_mrl,
+                                 &(p_vcdplayer->play_item) );
+        input_Control( p_vcdplayer->p_input, INPUT_SET_NAME, psz_name );
+        free( psz_title_format );
+        free(psz_mrl);
     }
 }