fixed bug that caused some frames to never render indefinitely
Frames should no longer get stuck unrendered.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user