[Scummvm-git-logs] scummvm master -> 9bf6f752f9c582343382163d7e0b0fe7e0b6d3c1
sev-
noreply at scummvm.org
Wed Mar 29 23:12:08 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9bf6f752f9 VIDEO: Fix crash when closing an MKV stream
Commit: 9bf6f752f9c582343382163d7e0b0fe7e0b6d3c1
https://github.com/scummvm/scummvm/commit/9bf6f752f9c582343382163d7e0b0fe7e0b6d3c1
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2023-03-30T01:12:03+02:00
Commit Message:
VIDEO: Fix crash when closing an MKV stream
Changed paths:
video/mkv_decoder.cpp
diff --git a/video/mkv_decoder.cpp b/video/mkv_decoder.cpp
index 396569a8aaf..b6cd9ae15db 100644
--- a/video/mkv_decoder.cpp
+++ b/video/mkv_decoder.cpp
@@ -134,7 +134,6 @@ bool MKVDecoder::loadStream(Common::SeekableReadStream *stream) {
warning("MKVDecoder::loadStream()");
- _fileStream = stream;
_reader = new mkvparser::MkvReader(stream);
long long pos = 0;
@@ -238,6 +237,7 @@ bool MKVDecoder::loadStream(Common::SeekableReadStream *stream) {
_pBlock = _pBlockEntry->GetBlock();
_trackNum = _pBlock->GetTrackNumber();
_frameCount = _pBlock->GetFrameCount();
+ _fileStream = stream;
return true;
}
@@ -245,7 +245,10 @@ bool MKVDecoder::loadStream(Common::SeekableReadStream *stream) {
void MKVDecoder::close() {
VideoDecoder::close();
+ delete _fileStream;
+ _fileStream = nullptr;
delete _reader;
+ _reader = nullptr;
}
void MKVDecoder::readNextPacket() {
More information about the Scummvm-git-logs
mailing list