aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/support/avi_surface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/support/avi_surface.cpp')
-rw-r--r--engines/titanic/support/avi_surface.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp
index 7779baf2ff..38bccafa89 100644
--- a/engines/titanic/support/avi_surface.cpp
+++ b/engines/titanic/support/avi_surface.cpp
@@ -260,10 +260,13 @@ int AVISurface::getFrame() const {
return _decoders[0]->getCurFrame();
}
+bool AVISurface::isFrameReady() const {
+ return _decoders[0]->needsUpdate() && (!_decoders[1] || _decoders[1]->needsUpdate());
+}
+
bool AVISurface::renderFrame() {
// Check there's a frame ready for display
- assert(_videoSurface);
- if (!_decoders[0]->needsUpdate() || (_decoders[1] && !_decoders[1]->needsUpdate()))
+ if (!isFrameReady())
return false;
// Decode each decoder's video stream into the appropriate surface