mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-06 14:52:34 +02:00
Bug 2178 - Export to (external program) fails with errors [WINDOWS]
This fixes the problem on Windows that if a user does not specify a suffix then ffmpeg does not know what format to use and gives a cryptic error message, if exporting using ffmpeg -i - "filename" Now, if no suffix is given, .wav is appended in the command sent to ffmpeg. If a user gives a suffix, e.g. 'myfile.wma' then no suffix is added.
This commit is contained in:
parent
29b0e31ee6
commit
2b15aa28ca
@ -107,6 +107,7 @@ void ExportCLOptions::PopulateOrExchange(ShuttleGui & S)
|
|||||||
wxString cmd;
|
wxString cmd;
|
||||||
|
|
||||||
for (size_t i = 0; i < mHistory.GetCount(); i++) {
|
for (size_t i = 0; i < mHistory.GetCount(); i++) {
|
||||||
|
cmd = mHistory.GetHistoryFile(i);
|
||||||
cmds.push_back(mHistory.GetHistoryFile(i));
|
cmds.push_back(mHistory.GetHistoryFile(i));
|
||||||
}
|
}
|
||||||
cmd = cmds[0];
|
cmd = cmds[0];
|
||||||
@ -332,6 +333,11 @@ ProgressResult ExportCL::Export(AudacityProject *project,
|
|||||||
// Retrieve settings
|
// Retrieve settings
|
||||||
gPrefs->Read(wxT("/FileFormats/ExternalProgramShowOutput"), &show, false);
|
gPrefs->Read(wxT("/FileFormats/ExternalProgramShowOutput"), &show, false);
|
||||||
cmd = gPrefs->Read(wxT("/FileFormats/ExternalProgramExportCommand"), wxT("lame - \"%f.mp3\""));
|
cmd = gPrefs->Read(wxT("/FileFormats/ExternalProgramExportCommand"), wxT("lame - \"%f.mp3\""));
|
||||||
|
// Bug 2178 - users who don't know what they are doing will
|
||||||
|
// now get a file extension of .wav appended to their ffmpeg filename
|
||||||
|
// and therefore ffmpeg will be able to choose a file type.
|
||||||
|
if( cmd == wxT("ffmpeg -i - \"%f\"") && fName.Index( '.' )==wxNOT_FOUND)
|
||||||
|
cmd.Replace( "%f", "%f.wav" );
|
||||||
cmd.Replace(wxT("%f"), fName);
|
cmd.Replace(wxT("%f"), fName);
|
||||||
|
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user