Ticket #13479: cinepak-fix-antoniou79.patch

File cinepak-fix-antoniou79.patch, 723 bytes (added by digitall, 6 weeks ago)
  • image/codecs/cinepak.cpp

    diff --git a/image/codecs/cinepak.cpp b/image/codecs/cinepak.cpp
    index 53d68617451..7b97691c275 100644
    a b const Graphics::Surface *CinepakDecoder::decodeFrame(Common::SeekableReadStream  
    424424        }
    425425
    426426        if (!_curFrame.surface) {
     427                _curFrame.surface = new Graphics::Surface();
     428                _curFrame.surface->create(_curFrame.width, _curFrame.height, _pixelFormat);
     429        } else if (_ditherPalette && _pixelFormat.bytesPerPixel != _curFrame.surface->format.bytesPerPixel) {
     430                _curFrame.surface->free();
     431                delete _curFrame.surface;
     432
    427433                _curFrame.surface = new Graphics::Surface();
    428434                _curFrame.surface->create(_curFrame.width, _curFrame.height, _pixelFormat);
    429435        }