mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 01:38:36 +00:00
SLUDGE: movie: Allocate substream on heap
MKVDecoder takes ownership of the passed stream, it can't be allocated on the stack. This fixes a crash in MKVDecoder destructor.
This commit is contained in:
parent
238670f3cd
commit
4b15de35f7
@ -50,9 +50,9 @@ int playMovie(int fileNumber) {
|
||||
|
||||
|
||||
Common::SeekableReadStream *stream = g_sludge->_resMan->getData();
|
||||
Common::SeekableSubReadStream video(stream, stream->pos(), stream->pos() + fsize);
|
||||
Common::SeekableSubReadStream *video = new Common::SeekableSubReadStream(stream, stream->pos(), stream->pos() + fsize);
|
||||
|
||||
if (decoder.loadStream(&video))
|
||||
if (decoder.loadStream(video))
|
||||
movieIsPlaying = kMoviePlaying;
|
||||
|
||||
decoder.start();
|
||||
|
Loading…
x
Reference in New Issue
Block a user