From 9ba98ae2d340fd22d5a8a3995feb7045d7b729d5 Mon Sep 17 00:00:00 2001 From: Johannes Mueller Date: Wed, 15 Apr 2015 19:55:48 +0200 Subject: Remove filename extension for chapter mark file The tool mp4chaps by the following command $ mp4chaps -i test.mp4 looks for the file "test.chapters.txt" to read the chapter marks from. So removing the original file name extension (e.g. wav or flac) makes it slightly more convenient for the user. --- libs/ardour/export_handler.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libs/ardour/export_handler.cc') diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc index bcc2783104..f30d5550b7 100644 --- a/libs/ardour/export_handler.cc +++ b/libs/ardour/export_handler.cc @@ -520,7 +520,10 @@ ExportHandler::get_cd_marker_filename(std::string filename, CDMarkerFormat forma case CDMarkerCUE: return filename + ".cue"; case MP4Chaps: - return filename + ".chapters.txt"; + { + unsigned lastdot = filename.find_last_of('.'); + return filename.substr(0,lastdot) + ".chapters.txt"; + } default: return filename + ".marker"; // Should not be reached when actually creating a file } -- cgit v1.2.3