Handle mutiple export files with the same extension but different format.

If multiple filenames have the same extension, append the format name
to the filename. This still requires a bit of extra logic to be optimal,
as the format name will now be added in some situations where it is not
needed. However, this is better than producing a broken file...
This commit is contained in:
Sakari Bergen
2013-03-17 12:32:48 +02:00
parent 2d081e43e1
commit 8cbb9727e9
7 changed files with 39 additions and 4 deletions

View File

@@ -129,7 +129,7 @@ ExportGraphBuilder::add_config (FileSpec const & config)
// If the sample rate is "session rate", change it to the real value.
// However, we need to copy it to not change the config which is saved...
FileSpec new_config (config);
new_config.format.reset(new ExportFormatSpecification(*new_config.format));
new_config.format.reset(new ExportFormatSpecification(*new_config.format, false));
if(new_config.format->sample_rate() == ExportFormatBase::SR_Session) {
framecnt_t session_rate = session.nominal_frame_rate();
new_config.format->set_sample_rate(ExportFormatBase::nearest_sample_rate(session_rate));