diff options
author | Matthew Hoops | 2012-09-05 11:45:25 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-09-05 11:45:25 -0400 |
commit | f35e820e9f2f4c2f8b9c6d3b572d588fccf99f19 (patch) | |
tree | 42510da50bdf8515a577fdd74622539ff829ef78 /video | |
parent | 2f9b1b67b08f1b70cd95795aaf7816ca7f991649 (diff) | |
parent | 058b9b9aca066c886ceb4e454a5541be70c27cb6 (diff) | |
download | scummvm-rg350-f35e820e9f2f4c2f8b9c6d3b572d588fccf99f19.tar.gz scummvm-rg350-f35e820e9f2f4c2f8b9c6d3b572d588fccf99f19.tar.bz2 scummvm-rg350-f35e820e9f2f4c2f8b9c6d3b572d588fccf99f19.zip |
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'video')
-rw-r--r-- | video/qt_decoder.cpp | 2 | ||||
-rw-r--r-- | video/video_decoder.cpp | 4 | ||||
-rw-r--r-- | video/video_decoder.h | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index 87c530dba0..b4dab9ddfb 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -216,7 +216,7 @@ void QuickTimeDecoder::init() { addTrack(new AudioTrackHandler(this, _audioTracks[i])); // Initialize all the video tracks - Common::Array<Common::QuickTimeParser::Track *> &tracks = Common::QuickTimeParser::_tracks; + const Common::Array<Common::QuickTimeParser::Track *> &tracks = Common::QuickTimeParser::_tracks; for (uint32 i = 0; i < tracks.size(); i++) { if (tracks[i]->codecType == CODEC_TYPE_VIDEO) { for (uint32 j = 0; j < tracks[i]->sampleDescs.size(); j++) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index e79043629c..c9d3d22070 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -250,7 +250,7 @@ uint32 VideoDecoder::getTimeToNextFrame() const { bool VideoDecoder::endOfVideo() const { for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) - if (!(*it)->endOfTrack() && ((*it)->getTrackType() != Track::kTrackTypeVideo || !_endTimeSet || ((VideoTrack *)*it)->getNextFrameStartTime() < (uint)_endTime.msecs())) + if (!(*it)->endOfTrack() && (!isPlaying() || (*it)->getTrackType() != Track::kTrackTypeVideo || !_endTimeSet || ((VideoTrack *)*it)->getNextFrameStartTime() < (uint)_endTime.msecs())) return false; return true; @@ -674,7 +674,7 @@ bool VideoDecoder::hasFramesLeft() const { // This is only used for needsUpdate() atm so that setEndTime() works properly // And unlike endOfVideoTracks(), this takes into account _endTime for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) - if ((*it)->getTrackType() == Track::kTrackTypeVideo && !(*it)->endOfTrack() && (!_endTimeSet || ((VideoTrack *)*it)->getNextFrameStartTime() < (uint)_endTime.msecs())) + if ((*it)->getTrackType() == Track::kTrackTypeVideo && !(*it)->endOfTrack() && (!isPlaying() || !_endTimeSet || ((VideoTrack *)*it)->getNextFrameStartTime() < (uint)_endTime.msecs())) return true; return false; diff --git a/video/video_decoder.h b/video/video_decoder.h index 7ccf49a0af..daf78c227a 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -180,6 +180,9 @@ public: /** * Set the time for this video to end at. At this time in the video, * all audio will stop and endOfVideo() will return true. + * + * While the setting is stored even if a video is not playing, + * endOfVideo() is only affected when the video is playing. */ void setEndTime(const Audio::Timestamp &endTime); |