Skip to content

Commit ea41196

Browse files
authored
Fix failure of supervisor_start_stop_movie introduced by PR #6623. (#6645)
* Fix failure of supervisor_start_stop_movie introduced by PR #6623. If the system ffmpeg links (possibly indirectly) to a different openssl than what we bundle, ffmpeg will fail to start. This fixes that by restoring the original LD_LIBRARY_PATH while running ffmpeg.
1 parent d9f6f7b commit ea41196

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/webots/gui/WbVideoRecorder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ QString WbVideoRecorder::nextFileName() {
459459

460460
void WbVideoRecorder::createMpeg() {
461461
#ifdef __linux__
462-
static const QString ffmpeg("ffmpeg");
462+
static const QString ffmpeg("LD_LIBRARY_PATH=\"$WEBOTS_ORIGINAL_LD_LIBRARY_PATH\" ffmpeg");
463463
static const QString percentageChar = "%";
464464
mScriptPath = "ffmpeg_script.sh";
465465
#elif defined(__APPLE__)

src/webots/launcher/webots-linux.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export TMPDIR=$WEBOTS_TMPDIR
6969
export WEBOTS_TMPDIR=$WEBOTS_TMPDIR
7070

7171
# add the "lib" directory into LD_LIBRARY_PATH as the first entry
72+
export WEBOTS_ORIGINAL_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
7273
export LD_LIBRARY_PATH="$webots_home/lib/webots":$LD_LIBRARY_PATH
7374

7475
# Fix for i3 window manager not working with Qt6

0 commit comments

Comments
 (0)