diff options
Diffstat (limited to 'engines/titanic/support')
-rw-r--r-- | engines/titanic/support/avi_surface.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp index 361982339d..11569e80ad 100644 --- a/engines/titanic/support/avi_surface.cpp +++ b/engines/titanic/support/avi_surface.cpp @@ -314,8 +314,14 @@ bool AVISurface::renderFrame() { const Graphics::Surface *frame = (idx == 0) ? _decoder->decodeNextFrame() : _decoder->decodeNextTransparency(); - assert(_movieFrameSurface[idx]->format == frame->format); - _movieFrameSurface[idx]->blitFrom(*frame); + if (_movieFrameSurface[idx]->format == frame->format) { + _movieFrameSurface[idx]->blitFrom(*frame); + } else { + Graphics::Surface *s = frame->convertTo(_movieFrameSurface[idx]->format, + _decoder->getPalette()); + _movieFrameSurface[idx]->blitFrom(*s); + delete s; + } } if (!_framePixels) { |