From 8c7157df6cd04868b927fc30ba703b4847e50f12 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 1 Apr 2022 18:12:47 +0200 Subject: [PATCH] Ignore LD-environment for mp3 im/export This fixes mp3 export on Linux/ARM (Raspberry Pi) with system-wide dynamically linked ffmpeg. Otherwise the there would be library conflicts with ardour-bundled libz and libcairo. --- libs/ardour/export_graph_builder.cc | 2 +- libs/ardour/export_handler.cc | 2 +- libs/ardour/ffmpegfileimportable.cc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/ardour/export_graph_builder.cc b/libs/ardour/export_graph_builder.cc index 94e73c72dc..9fdfe5bb20 100644 --- a/libs/ardour/export_graph_builder.cc +++ b/libs/ardour/export_graph_builder.cc @@ -411,7 +411,7 @@ ExportGraphBuilder::Encoder::init_writer (boost::shared_ptrto_s () << "}" << endmsg; if (exec->start (SystemExec::MergeWithStdin)) { throw ExportFailed ("External encoder (ffmpeg) cannot be started."); diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc index d1412e8427..965b293c96 100644 --- a/libs/ardour/export_handler.cc +++ b/libs/ardour/export_handler.cc @@ -463,7 +463,7 @@ ExportHandler::finish_timespan () subs.insert (std::pair ('Y', year.str ())); subs.insert (std::pair ('Z', metadata.country ())); - ARDOUR::SystemExec *se = new ARDOUR::SystemExec(fmt->command(), subs); + ARDOUR::SystemExec *se = new ARDOUR::SystemExec(fmt->command(), subs, true); info << "Post-export command line : {" << se->to_s () << "}" << endmsg; se->ReadStdout.connect_same_thread(command_connection, boost::bind(&ExportHandler::command_output, this, _1, _2)); int ret = se->start (SystemExec::MergeWithStdin); diff --git a/libs/ardour/ffmpegfileimportable.cc b/libs/ardour/ffmpegfileimportable.cc index 0727d0f88e..43339b1c74 100644 --- a/libs/ardour/ffmpegfileimportable.cc +++ b/libs/ardour/ffmpegfileimportable.cc @@ -57,7 +57,7 @@ FFMPEGFileImportableSource::FFMPEGFileImportableSource (const std::string& path, argp[a++] = strdup ("-of"); argp[a++] = strdup ("json"); - ARDOUR::SystemExec* exec = new ARDOUR::SystemExec (ffprobe_exe, argp); + ARDOUR::SystemExec* exec = new ARDOUR::SystemExec (ffprobe_exe, argp, true); PBD::info << "Probe command: { " << exec->to_s () << "}" << endmsg; if (exec->start ()) { @@ -186,7 +186,7 @@ FFMPEGFileImportableSource::start_ffmpeg () #endif argp[a++] = strdup ("-"); - _ffmpeg_exec = new ARDOUR::SystemExec (ffmpeg_exe, argp); + _ffmpeg_exec = new ARDOUR::SystemExec (ffmpeg_exe, argp, true); PBD::info << "Decode command: { " << _ffmpeg_exec->to_s () << "}" << endmsg; if (_ffmpeg_exec->start ()) { PBD::error << "FFMPEGFileImportableSource: External decoder (ffmpeg) cannot be started." << endmsg;