Skip to content

Commit

Permalink
PETKA: fix memory leak in video decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Rampopula authored and voltya committed Oct 6, 2020
1 parent 43524fe commit 7f9fe28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/petka/petka.cpp
Expand Up @@ -197,7 +197,7 @@ void PetkaEngine::playVideo(Common::SeekableReadStream *stream) {
if (decoder.needsUpdate()) {
const Graphics::Surface *frame = decoder.decodeNextFrame();
if (frame) {
Common::ScopedPtr<Graphics::Surface> f(frame->convertTo(fmt));
Common::ScopedPtr<Graphics::Surface, Graphics::SurfaceDeleter> f(frame->convertTo(fmt));
_system->copyRectToScreen(f->getPixels(), f->pitch, 0, 0, f->w, f->h);
}
}
Expand Down

0 comments on commit 7f9fe28

Please sign in to comment.