fixed bug that caused some frames to never render indefinitely

Frames should no longer get stuck unrendered.
This commit is contained in:
itsmattkc
2019-11-17 17:14:08 +09:00
parent 2752a0a005
commit 8e6c23ffc1
4 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -175,7 +175,7 @@ void OpenGLBackend::ThreadCompletedFrame(NodeDependency path, QByteArray hash)
if (texture == nullptr) {
// No frame received, we set hash to an empty
frame_cache()->RemoveHash(path.in());
frame_cache()->RemoveHash(path.in(), hash);
} else {
// Received a texture, let's download it
QString cache_fn = frame_cache()->CachePathName(hash);
-2
View File
@@ -164,8 +164,6 @@ void RenderBackend::CacheNext()
TimeRange cache_frame = cache_queue_.takeFirst();
//qDebug() << "Caching FRAME" << cache_frame.in() << "to" << cache_frame.out();
caching_ = GenerateData(cache_frame);
}
+2 -2
View File
@@ -60,9 +60,9 @@ void VideoRenderFrameCache::SetHash(const rational &time, const QByteArray &hash
time_hash_map_.insert(time, hash);
}
void VideoRenderFrameCache::RemoveHash(const rational &time)
void VideoRenderFrameCache::RemoveHash(const rational &time, const QByteArray &hash)
{
RemoveHashFromCurrentlyCaching(time_hash_map_.value(time));
RemoveHashFromCurrentlyCaching(hash);
time_hash_map_.remove(time);
}
+1 -1
View File
@@ -35,7 +35,7 @@ public:
QByteArray TimeToHash(const rational& time);
void SetHash(const rational& time, const QByteArray& hash);
void RemoveHash(const rational& time);
void RemoveHash(const rational& time, const QByteArray &hash);
void Truncate(const rational& time);