viewer: re-queue video renderer even when beyond the length

Ensures video renderer always renders where the playhead is.
This commit is contained in:
itsmattkc
2020-04-13 13:19:08 +10:00
parent cdf5a1058d
commit aac47ba776
3 changed files with 11 additions and 3 deletions
+8 -3
View File
@@ -165,7 +165,7 @@ VideoRenderFrameCache *VideoRenderBackend::frame_cache()
QString VideoRenderBackend::GetCachedFrame(const rational &time)
{
last_time_requested_ = time;
UpdateLastRequestedTime(time);
if (viewer_node() == nullptr) {
// Nothing is connected - nothing to show or render
@@ -182,8 +182,6 @@ QString VideoRenderBackend::GetCachedFrame(const rational &time)
return nullptr;
}
Requeue();
// Find frame in map
QByteArray frame_hash = frame_cache_.TimeToHash(time);
@@ -196,6 +194,13 @@ QString VideoRenderBackend::GetCachedFrame(const rational &time)
return QString();
}
void VideoRenderBackend::UpdateLastRequestedTime(const rational &time)
{
last_time_requested_ = time;
Requeue();
}
NodeInput *VideoRenderBackend::GetDependentInput()
{
return viewer_node()->texture_input();