Fix misleading behavior with temp file extention being always .mp3 when run via GUI.

svn-id: r46438
This commit is contained in:
Eugene Sandulenko
2009-12-20 19:42:02 +00:00
parent e9cf5c4ee0
commit 2a1a5cef37
4 changed files with 24 additions and 3 deletions
+16 -3
View File
@@ -910,17 +910,14 @@ void CompressionTool::parseAudioArguments() {
// Need workaround to be sign-correct
switch (_format) {
case AUDIO_MP3:
tempEncoded = TEMP_MP3;
if (!processMp3Parms())
throw ToolException("Could not parse command line arguments, use --help for options");
break;
case AUDIO_VORBIS:
tempEncoded = TEMP_OGG;
if (!processOggParms())
throw ToolException("Could not parse command line arguments, use --help for options");
break;
case AUDIO_FLAC:
tempEncoded = TEMP_FLAC;
if (!processFlacParms())
throw ToolException("Could not parse arguments: Use --help for options");
break;
@@ -929,6 +926,22 @@ void CompressionTool::parseAudioArguments() {
}
}
void CompressionTool::setTempFileName() {
switch (_format) {
case AUDIO_MP3:
tempEncoded = TEMP_MP3;
break;
case AUDIO_VORBIS:
tempEncoded = TEMP_OGG;
break;
case AUDIO_FLAC:
tempEncoded = TEMP_FLAC;
break;
default: // cannot occur but we check anyway to avoid compiler warnings
throw ToolException("Unknown audio format, should be impossible!");
}
}
std::string CompressionTool::getHelp() const {
std::ostringstream os;