From 4e3cafe5782edc23e8e9eec3e848d5d90ed61b5a Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Mon, 10 Aug 2020 02:08:58 +1000 Subject: [PATCH] precachetask: removed unnecessary hash setting Pre-cache doesn't need to set a memory cache since its only purpose is to write to the disk cache. --- app/task/precache/precachetask.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/task/precache/precachetask.cpp b/app/task/precache/precachetask.cpp index c8baf5bd3..4829affb1 100644 --- a/app/task/precache/precachetask.cpp +++ b/app/task/precache/precachetask.cpp @@ -80,9 +80,12 @@ QFuture PreCacheTask::DownloadFrame(FramePtr frame, const QByteArray &hash void PreCacheTask::FrameDownloaded(const QByteArray &hash, const std::list ×, qint64 job_time) { - foreach (const rational& t, times) { - viewer()->video_frame_cache()->SetHash(t, hash, job_time, true); - } + // Do nothing. Pre-cache essentially just creates more frames in the cache, it doesn't need to do + // anything else. + + Q_UNUSED(hash) + Q_UNUSED(times) + Q_UNUSED(job_time) } void PreCacheTask::AudioDownloaded(const TimeRange &range, SampleBufferPtr samples, qint64 job_time)