aboutsummaryrefslogtreecommitdiff
path: root/video/video_decoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'video/video_decoder.cpp')
-rw-r--r--video/video_decoder.cpp4
1 files changed, 2 insertions, 2 deletions
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;