renderer: copy cache path before render to avoid race conditions

This commit is contained in:
itsmattkc
2020-09-05 18:48:54 +10:00
parent 1334c04235
commit cabcd49b25
7 changed files with 28 additions and 15 deletions
+3 -1
View File
@@ -59,12 +59,14 @@ public:
* @brief Return the path of the cached image at this time
*/
QString CachePathName(const QByteArray &hash) const;
static QString CachePathName(const QString& cache_path, const QByteArray &hash);
bool SaveCacheFrame(const QString& filename, char *data, const VideoParams &vparam, int linesize_bytes) const;
bool SaveCacheFrame(const QByteArray& hash, char *data, const VideoParams &vparam, int linesize_bytes) const;
bool SaveCacheFrame(const QByteArray& hash, FramePtr frame) const;
static FramePtr LoadCacheFrame(const QString& cache_path, const QByteArray& hash);
FramePtr LoadCacheFrame(const QByteArray& hash) const;
FramePtr LoadCacheFrame(const QString& fn) const;
static FramePtr LoadCacheFrame(const QString& fn);
static QString GetFormatExtension();