diff --git a/app/render/playbackcache.cpp b/app/render/playbackcache.cpp index 349e9e33f..2398a3f80 100644 --- a/app/render/playbackcache.cpp +++ b/app/render/playbackcache.cpp @@ -87,12 +87,24 @@ void PlaybackCache::SetLength(const rational &r) } } -void PlaybackCache::Shift(const rational &from, const rational &to) +void PlaybackCache::Shift(rational from, rational to) { if (from == to) { return; } + if (from > length_) { + if (to > from) { + // No-op + return; + } else if (to >= length_) { + // No-op + return; + } else { + from = length_; + } + } + qDebug() << "FIXME: 0 job time may cause cache desyncs"; // An region between `from` and `to` will be inserted or spliced out diff --git a/app/render/playbackcache.h b/app/render/playbackcache.h index 2f5b39720..e2fb48fcb 100644 --- a/app/render/playbackcache.h +++ b/app/render/playbackcache.h @@ -69,7 +69,7 @@ public slots: void SetLength(const rational& r); - void Shift(const rational& from, const rational& to); + void Shift(rational from, rational to); signals: void Invalidated(const olive::TimeRange& r);