]> git.sesse.net Git - vlc/blobdiff - src/input/es_out.c
Add a directory type parameter to config_GetHomeDir
[vlc] / src / input / es_out.c
index 9ca862851b58033d119906623ecdb9440475fa0b..4f97a92d64501d71d05ece2a01e5e70ae8b5f69b 100644 (file)
@@ -464,12 +464,9 @@ static int EsOutSetRecord(  es_out_t *out, bool b_record )
 
     if( b_record )
     {
-        char *psz_path = var_CreateGetString( p_input, "input-record-path" );
-        if( !psz_path || *psz_path == '\0' )
-        {
-            free( psz_path );
-            psz_path = strdup( config_GetHomeDir() );
-        }
+        char *psz_path = var_CreateGetNonEmptyString( p_input, "input-record-path" );
+        if( !psz_path )
+            psz_path = config_GetUserDir(VLC_HOME_DIR);
 
         char *psz_sout = NULL;  // TODO conf