diff --git a/app/render/rendermanager.cpp b/app/render/rendermanager.cpp index 567b841d6..453445bbf 100644 --- a/app/render/rendermanager.cpp +++ b/app/render/rendermanager.cpp @@ -145,6 +145,10 @@ RenderTicketPtr RenderManager::RenderFrame(ViewerOutput* viewer, ColorManager* c ticket->setProperty("cache", cache->GetCacheDirectory()); } + if (ticket->thread() != this->thread()) { + ticket->moveToThread(this->thread()); + } + // Queue appending the ticket and running the next job on our thread to make this function thread-safe QMetaObject::invokeMethod(this, "AddTicket", Qt::AutoConnection, OLIVE_NS_ARG(RenderTicketPtr, ticket), @@ -169,6 +173,10 @@ RenderTicketPtr RenderManager::RenderAudio(ViewerOutput* viewer, const TimeRange ticket->setProperty("waveforms", generate_waveforms); ticket->setProperty("aparam", QVariant::fromValue(params)); + if (ticket->thread() != this->thread()) { + ticket->moveToThread(this->thread()); + } + // Queue appending the ticket and running the next job on our thread to make this function thread-safe QMetaObject::invokeMethod(this, "AddTicket", Qt::AutoConnection, OLIVE_NS_ARG(RenderTicketPtr, ticket), @@ -187,6 +195,10 @@ RenderTicketPtr RenderManager::SaveFrameToCache(FrameHashCache *cache, FramePtr ticket->setProperty("hash", hash); ticket->setProperty("type", kTypeVideoDownload); + if (ticket->thread() != this->thread()) { + ticket->moveToThread(this->thread()); + } + // Queue appending the ticket and running the next job on our thread to make this function thread-safe QMetaObject::invokeMethod(this, "AddTicket", Qt::AutoConnection, OLIVE_NS_ARG(RenderTicketPtr, ticket),