Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / sound / sound_ops.c
index 07d12de..049feea 100644 (file)
@@ -375,7 +375,7 @@ static int sound_mixdown_exec(bContext *C, wmOperator *op)
        specs.rate = scene->r.ffcodecdata.audio_mixrate;
 
        BLI_strncpy(filename, path, sizeof(filename));
-       BLI_path_abs(filename, bmain->name);
+       BLI_path_abs(filename, BKE_main_blendfile_path(bmain));
 
        if (split)
                result = AUD_mixdown_per_channel(scene->sound_scene, SFRA * specs.rate / FPS, (EFRA - SFRA + 1) * specs.rate / FPS,
@@ -455,10 +455,10 @@ static bool sound_mixdown_check(bContext *UNUSED(C), wmOperator *op)
                prop = RNA_struct_find_property(op->ptr, "filepath");
                RNA_property_string_get(op->ptr, prop, filepath);
 
-               if (BLI_testextensie_array(filepath, snd_ext_sound))
-                       check = BLI_replace_extension(filepath, FILE_MAX, extension);
+               if (BLI_path_extension_check_array(filepath, snd_ext_sound))
+                       check = BLI_path_extension_replace(filepath, FILE_MAX, extension);
                else
-                       check = BLI_ensure_extension(filepath, FILE_MAX, extension);
+                       check = BLI_path_extension_ensure(filepath, FILE_MAX, extension);
 
                if (!check)
                        return check;