Commit 754b8eee authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix NVIDIA crash with GPU accel (movit)

parent 8a20fca8
...@@ -44,7 +44,7 @@ int main(int argc, char *argv[]) ...@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
// Force QDomDocument to use a deterministic XML attribute order // Force QDomDocument to use a deterministic XML attribute order
extern Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed; extern Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed;
qt_qhash_seed.store(0); qt_qhash_seed.store(0);
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
QCoreApplication::setAttribute(Qt::AA_X11InitThreads); QCoreApplication::setAttribute(Qt::AA_X11InitThreads);
#endif #endif
......
...@@ -299,7 +299,19 @@ void ProducerQueue::processFileProperties() ...@@ -299,7 +299,19 @@ void ProducerQueue::processFileProperties()
} else if (service.contains(QStringLiteral("avformat"))) { } else if (service.contains(QStringLiteral("avformat"))) {
Mlt::Profile *blankProfile = new Mlt::Profile(); Mlt::Profile *blankProfile = new Mlt::Profile();
blankProfile->set_explicit(false); blankProfile->set_explicit(false);
blankProfile->from_producer(*producer); if (KdenliveSettings::gpu_accel()) {
Clip clp(*producer);
Mlt::Producer *glProd = clp.softClone(ClipController::getPassPropertiesList());
Mlt::Filter scaler(*m_binController->profile(), "swscale");
Mlt::Filter converter(*m_binController->profile(), "avcolor_space");
glProd->attach(scaler);
glProd->attach(converter);
blankProfile->from_producer(*glProd);
delete glProd;
}
else {
blankProfile->from_producer(*producer);
}
MltVideoProfile clipProfile = ProfilesDialog::getVideoProfile(*blankProfile); MltVideoProfile clipProfile = ProfilesDialog::getVideoProfile(*blankProfile);
MltVideoProfile projectProfile = ProfilesDialog::getVideoProfile(*m_binController->profile()); MltVideoProfile projectProfile = ProfilesDialog::getVideoProfile(*m_binController->profile());
clipProfile.adjustWidth(); clipProfile.adjustWidth();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment