]> git.sesse.net Git - vlc/commitdiff
record: more specific record directories (video/music/other)
authorErwan Tulou <erwan10@videolan.org>
Sat, 29 Aug 2009 18:24:08 +0000 (20:24 +0200)
committerErwan Tulou <erwan10@videolan.org>
Sat, 29 Aug 2009 18:52:51 +0000 (20:52 +0200)
src/input/es_out.c

index ca866a7d49ffe85195af6a61fcd5998450108d6f..500f49dc4e07e2abcdd996fca1a70b7c2f35c1a1 100644 (file)
@@ -466,8 +466,14 @@ static int EsOutSetRecord(  es_out_t *out, bool b_record )
     {
         char *psz_path = var_CreateGetNonEmptyString( p_input, "input-record-path" );
         if( !psz_path )
-            /* TODO: autoselect video or music dir ? */
-            psz_path = config_GetUserDir(VLC_DOWNLOAD_DIR);
+        {
+            if( var_CountChoices( p_input, "video-es" ) )
+                psz_path = config_GetUserDir( VLC_VIDEOS_DIR );
+            else if( var_CountChoices( p_input, "audio-es" ) )
+                psz_path = config_GetUserDir( VLC_MUSIC_DIR );
+            else
+                psz_path = config_GetUserDir( VLC_DOWNLOAD_DIR );
+        }
 
         char *psz_sout = NULL;  // TODO conf