diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-01-29 23:26:32 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-01-29 23:26:32 +0000 |
| commit | e1eb3e861b93226e5fbc196efccdf920132d9b7d (patch) | |
| tree | cd1a382a15a70ee7895f05b1c213332975420c9f | |
| parent | 808c589d0aedaa72a807cb4e628d2786140d0966 (diff) | |
Force correct extensions for export filenames.
| -rw-r--r-- | src/wx/export_dialog.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wx/export_dialog.cc b/src/wx/export_dialog.cc index 4661e5468..2223261d9 100644 --- a/src/wx/export_dialog.cc +++ b/src/wx/export_dialog.cc @@ -38,6 +38,11 @@ wxString format_filters[] = { _("MP4 files (*.mp4)|*.mp4"), }; +wxString format_extensions[] = { + "mov", + "mp4" +}; + FFmpegEncoder::Format formats[] = { FFmpegEncoder::FORMAT_PRORES, FFmpegEncoder::FORMAT_H264, @@ -81,7 +86,9 @@ ExportDialog::format_changed () boost::filesystem::path ExportDialog::path () const { - return wx_to_std (_file->GetPath ()); + wxFileName fn (_file->GetPath()); + fn.SetExt (format_extensions[_format->GetSelection()]); + return wx_to_std (fn.GetFullPath()); } FFmpegEncoder::Format |
