From a333f3c44ccde58438cb0deb9a6398b3008aeeec Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 12 Oct 2016 20:09:36 -0400 Subject: VIDEO: Support rewind on AVI files with multiple video tracks --- video/avi_decoder.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'video/avi_decoder.h') diff --git a/video/avi_decoder.h b/video/avi_decoder.h index db9928d444..4bba07e98f 100644 --- a/video/avi_decoder.h +++ b/video/avi_decoder.h @@ -272,10 +272,15 @@ protected: uint32 chunkSearchOffset; }; + class IndexEntries : public Common::Array { + public: + OldIndex *find(uint index, uint frameNumber); + }; + AVIHeader _header; void readOldIndex(uint32 size); - Common::Array _indexEntries; + IndexEntries _indexEntries; Common::SeekableReadStream *_fileStream; bool _decodedHeader; @@ -296,8 +301,9 @@ protected: void handleStreamHeader(uint32 size); void readStreamName(uint32 size); uint16 getStreamType(uint32 tag) const { return tag & 0xFFFF; } - byte getStreamIndex(uint32 tag) const; + static byte getStreamIndex(uint32 tag); void checkTruemotion1(); + uint getVideoTrackOffset(uint trackIndex, uint frameNumber = 0); void handleNextPacket(TrackStatus& status); bool shouldQueueAudio(TrackStatus& status); -- cgit v1.2.3