toxic: 0.15.1 -> 0.16.0
[NixPkgs.git] / pkgs / by-name / sh / shotcut / fix-mlt-ffmpeg-path.patch
blobfa584162cbe8364ea993bdd768558766a98b4ba7
1 diff --git a/src/docks/encodedock.cpp b/src/docks/encodedock.cpp
2 index 3359f676..24e44f98 100644
3 --- a/src/docks/encodedock.cpp
4 +++ b/src/docks/encodedock.cpp
5 @@ -2177,7 +2177,7 @@ bool EncodeDock::detectHardwareEncoders()
7 MAIN.showStatusMessage(tr("Detecting hardware encoders..."));
8 QStringList hwlist;
9 - QFileInfo ffmpegPath(qApp->applicationDirPath(), "ffmpeg");
10 + QFileInfo ffmpegPath("@ffmpeg@/bin/ffmpeg");
11 foreach (const QString &codec, codecs()) {
12 LOG_INFO() << "checking for" << codec;
13 QProcess proc;
14 @@ -2220,7 +2220,7 @@ bool EncodeDock::detectHardwareEncoders()
15 QString &EncodeDock::defaultFormatExtension()
17 auto format = ui->formatCombo->currentText();
18 - QFileInfo ffmpegPath(qApp->applicationDirPath(), "ffmpeg");
19 + QFileInfo ffmpegPath("@ffmpeg@/bin/ffmpeg");
20 QProcess proc;
21 QStringList args;
22 args << "-hide_banner" << "-h" << format.prepend("muxer=");
23 diff --git a/src/jobs/ffmpegjob.cpp b/src/jobs/ffmpegjob.cpp
24 index 1f15e647..b6ad6633 100644
25 --- a/src/jobs/ffmpegjob.cpp
26 +++ b/src/jobs/ffmpegjob.cpp
27 @@ -54,7 +54,7 @@ FfmpegJob::~FfmpegJob()
28 void FfmpegJob::start()
30 QString shotcutPath = qApp->applicationDirPath();
31 - QFileInfo ffmpegPath(shotcutPath, "ffmpeg");
32 + QFileInfo ffmpegPath("@ffmpeg@/bin/ffmpeg");
33 setReadChannel(QProcess::StandardError);
34 LOG_DEBUG() << ffmpegPath.absoluteFilePath() + " " + m_args.join(' ');
35 AbstractJob::start(ffmpegPath.absoluteFilePath(), m_args);
36 diff --git a/src/jobs/meltjob.cpp b/src/jobs/meltjob.cpp
37 index fd8c00b8..9150fe7b 100644
38 --- a/src/jobs/meltjob.cpp
39 +++ b/src/jobs/meltjob.cpp
40 @@ -98,9 +98,9 @@ void MeltJob::start()
42 QString shotcutPath = qApp->applicationDirPath();
43 #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
44 - QFileInfo meltPath(shotcutPath, "melt-7");
45 + QFileInfo meltPath("@mlt@/bin/melt");
46 #else
47 - QFileInfo meltPath(shotcutPath, "melt");
48 + QFileInfo meltPath("@mlt@/bin/melt");
49 #endif
50 setReadChannel(QProcess::StandardError);
51 QStringList args;
52 diff --git a/src/mltcontroller.cpp b/src/mltcontroller.cpp
53 index 1e2299ac..b8f39f12 100644
54 --- a/src/mltcontroller.cpp
55 +++ b/src/mltcontroller.cpp
56 @@ -1555,9 +1555,9 @@ int Controller::checkFile(const QString &path)
57 || path.endsWith(".aep")) {
58 QString shotcutPath = qApp->applicationDirPath();
59 #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
60 - QFileInfo meltPath(shotcutPath, "melt-7");
61 + QFileInfo meltPath("@mlt@/bin/melt");
62 #else
63 - QFileInfo meltPath(shotcutPath, "melt");
64 + QFileInfo meltPath("@mlt@/bin/melt");
65 #endif
66 QStringList args;
67 args << "-quiet" << "-consumer" << "null" << "real_time=0" << "out=0" << "terminate_on_pause=1" <<
68 diff --git a/src/widgets/directshowvideowidget.cpp b/src/widgets/directshowvideowidget.cpp
69 index c91ba821..73dd5a61 100644
70 --- a/src/widgets/directshowvideowidget.cpp
71 +++ b/src/widgets/directshowvideowidget.cpp
72 @@ -35,7 +35,7 @@ DirectShowVideoWidget::DirectShowVideoWidget(QWidget *parent) :
73 ui->setupUi(this);
74 Util::setColorsToHighlight(ui->label);
75 #ifdef Q_OS_WIN
76 - QFileInfo ffmpegPath(qApp->applicationDirPath(), "ffmpeg");
77 + QFileInfo ffmpegPath("@ffmpeg@/bin/ffmpeg");
78 QProcess proc;
79 QStringList args;
80 args << "-hide_banner" << "-list_devices" << "true" << "-f" << "dshow" << "-i" << "dummy";