From 5a067f57dadefa29dacc41333b846cfb7128af38 Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Thu, 28 Jul 2022 14:49:10 -0700 Subject: [PATCH] previewautocacher: run passthroughs before TryRender --- app/render/previewautocacher.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/render/previewautocacher.cpp b/app/render/previewautocacher.cpp index e876ddafa..2bf3dcaca 100644 --- a/app/render/previewautocacher.cpp +++ b/app/render/previewautocacher.cpp @@ -193,6 +193,17 @@ void PreviewAutoCacher::VideoRendered() { RenderTicketWatcher* watcher = static_cast(sender()); + // Process passthroughs no matter what, if the viewer was switched, the passthrough map would be + // cleared anyway + QVector tickets = video_immediate_passthroughs_.take(watcher); + foreach (RenderTicketPtr t, tickets) { + if (watcher->HasResult()) { + t->Finish(watcher->Get()); + } else { + t->Finish(); + } + } + // If the task list doesn't contain this watcher, presumably it was cleared as a result of a // viewer switch, so we'll completely ignore this watcher auto it = video_tasks_.find(watcher); @@ -214,17 +225,6 @@ void PreviewAutoCacher::VideoRendered() TryRender(); } - // Process passthroughs no matter what, if the viewer was switched, the passthrough map would be - // cleared anyway - QVector tickets = video_immediate_passthroughs_.take(watcher); - foreach (RenderTicketPtr t, tickets) { - if (watcher->HasResult()) { - t->Finish(watcher->Get()); - } else { - t->Finish(); - } - } - delete watcher; }