]> git.sesse.net Git - vlc/blobdiff - modules/stream_filter/record.c
Release the display mode when we are done with it.
[vlc] / modules / stream_filter / record.c
index dee348ac01571b55a23064427c3895c645892368..9ce1c60bd90456b95db8cae56fce1a8d1d1ad3e2 100644 (file)
@@ -34,7 +34,7 @@
 #include <assert.h>
 #include <vlc_stream.h>
 #include <vlc_input.h>
-#include <vlc_charset.h>
+#include <vlc_fs.h>
 
 
 /*****************************************************************************
@@ -177,7 +177,7 @@ static int Start( stream_t *s, const char *psz_extension )
     /* Retreive path */
     char *psz_path = var_CreateGetNonEmptyString( s, "input-record-path" );
     if( !psz_path )
-        psz_path = config_GetUserDir( VLC_HOME_DIR );
+        psz_path = config_GetUserDir( VLC_DOWNLOAD_DIR );
 
     if( !psz_path )
         return VLC_ENOMEM;
@@ -191,12 +191,16 @@ static int Start( stream_t *s, const char *psz_extension )
     if( !psz_file )
         return VLC_ENOMEM;
 
-    f = utf8_fopen( psz_file, "wb" );
+    f = vlc_fopen( psz_file, "wb" );
     if( !f )
     {
         free( psz_file );
         return VLC_EGENERIC;
     }
+
+    /* signal new record file */
+    var_SetString( s->p_libvlc, "record-file", psz_file );
+
     msg_Dbg( s, "Recording into %s", psz_file );
     free( psz_file );