X-Git-Url: https://git.sesse.net/?p=kdenlive;a=blobdiff_plain;f=src%2Fkthumb.cpp;h=5a81f5481ad789e159b7fdb8ce449faf0ece0773;hp=3bf19e2841dc28758ee9cd995818923d2c203822;hb=a3eee7be24126f5a3458d488f44cd61c66135e17;hpb=6c62a4d8f799379bfb7a11d25521cf829248587c diff --git a/src/kthumb.cpp b/src/kthumb.cpp index 3bf19e28..5a81f548 100644 --- a/src/kthumb.cpp +++ b/src/kthumb.cpp @@ -40,6 +40,7 @@ #include #include #include +#include KThumb::KThumb(ClipManager *clipManager, const KUrl &url, const QString &id, const QString &hash, QObject * parent) : QObject(parent), @@ -376,6 +377,10 @@ void KThumb::queryIntraThumbs(const QList &missingFrames) void KThumb::slotGetIntraThumbs() { + // We are in a new thread, so we need a new OpenGL context for the remainder of the function. + QGLWidget ctx(0, m_clipManager->getMainContext()); + ctx.makeCurrent(); + const int theight = KdenliveSettings::trackheight(); const int frameWidth = (int)(theight * m_ratio + 0.5); const int displayWidth = (int)(theight * m_dar + 0.5);