mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 00:15:30 +00:00
VIDEO: Fix MKV frames navigation. First visuals
This commit is contained in:
parent
0357ccc5d9
commit
2b15031f55
@ -271,6 +271,14 @@ bool MKVDecoder::loadStream(Common::SeekableReadStream *stream) {
|
||||
error("_cluster::GetFirst() failed");
|
||||
}
|
||||
|
||||
pBlock = pBlockEntry->GetBlock();
|
||||
trackNum = pBlock->GetTrackNumber();
|
||||
tn = static_cast<unsigned long>(trackNum);
|
||||
pTrack = pTracks->GetTrackByNumber(tn);
|
||||
trackType = pTrack->GetType();
|
||||
frameCount = pBlock->GetFrameCount();
|
||||
time_ns = pBlock->GetTime(_cluster);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -283,14 +291,6 @@ void MKVDecoder::close() {
|
||||
void MKVDecoder::readNextPacket() {
|
||||
warning("MKVDecoder::readNextPacket()");
|
||||
|
||||
const mkvparser::Block *pBlock = pBlockEntry->GetBlock();
|
||||
long long trackNum = pBlock->GetTrackNumber();
|
||||
unsigned long tn = static_cast<unsigned long>(trackNum);
|
||||
const mkvparser::Track *pTrack = pTracks->GetTrackByNumber(tn);
|
||||
long long trackType = pTrack->GetType();
|
||||
int frameCount = pBlock->GetFrameCount();
|
||||
long long time_ns = pBlock->GetTime(_cluster);
|
||||
|
||||
// First, let's get our frame
|
||||
while (_cluster != nullptr && !_cluster->EOS()) {
|
||||
if (frameCounter >= frameCount) {
|
||||
|
@ -58,6 +58,7 @@ class MkvReader;
|
||||
class Cluster;
|
||||
class Track;
|
||||
class Tracks;
|
||||
class Block;
|
||||
class BlockEntry;
|
||||
class Segment;
|
||||
}
|
||||
@ -180,6 +181,14 @@ private:
|
||||
int videoTrack = -1;
|
||||
int audioTrack = -1;
|
||||
|
||||
const mkvparser::Block *pBlock;
|
||||
long long trackNum;
|
||||
unsigned long tn;
|
||||
const mkvparser::Track *pTrack;
|
||||
long long trackType;
|
||||
int frameCount;
|
||||
long long time_ns;
|
||||
|
||||
Graphics::Surface _displaySurface;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user