aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2016-11-14 22:51:10 -0500
committerPaul Gilbert2016-11-14 22:51:10 -0500
commit4e515ea3fed53f8390fa3a0776aee170e4be1b95 (patch)
treec226496fad7cd0ea932becc6cd294a710a2b2655 /engines/titanic
parentf57287702e4cacc17b655bababf9167783e9e159 (diff)
downloadscummvm-rg350-4e515ea3fed53f8390fa3a0776aee170e4be1b95.tar.gz
scummvm-rg350-4e515ea3fed53f8390fa3a0776aee170e4be1b95.tar.bz2
scummvm-rg350-4e515ea3fed53f8390fa3a0776aee170e4be1b95.zip
TITANIC: Properly handle videos with some frames being paletted 8-bit
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/support/avi_surface.cpp10
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) {