aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2012-07-27 11:01:42 -0400
committerMatthew Hoops2012-07-27 11:01:42 -0400
commit90b72e31e4a9f2a23d912d31343ba25f27da7b3e (patch)
treed29d71928ece4adb47a4058a8926672571554508
parenta364ef8f0fca2675f791a29ef231385e29945939 (diff)
downloadscummvm-rg350-90b72e31e4a9f2a23d912d31343ba25f27da7b3e.tar.gz
scummvm-rg350-90b72e31e4a9f2a23d912d31343ba25f27da7b3e.tar.bz2
scummvm-rg350-90b72e31e4a9f2a23d912d31343ba25f27da7b3e.zip
VIDEO: Cleanup AdvancedVideoDecoder
-rw-r--r--video/video_decoder.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp
index cea3960fee..131c86fdb8 100644
--- a/video/video_decoder.cpp
+++ b/video/video_decoder.cpp
@@ -111,7 +111,7 @@ AdvancedVideoDecoder::AdvancedVideoDecoder() {
}
void AdvancedVideoDecoder::close() {
- if (_isPlaying)
+ if (isPlaying())
stop();
for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++)
@@ -250,7 +250,7 @@ bool AdvancedVideoDecoder::endOfVideo() const {
}
bool AdvancedVideoDecoder::isRewindable() const {
- if (_tracks.empty())
+ if (!isVideoLoaded())
return false;
for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++)
@@ -267,7 +267,7 @@ bool AdvancedVideoDecoder::rewind() {
_needsRewind = false;
// Stop all tracks so they can be rewound
- if (_isPlaying)
+ if (isPlaying())
stopAllTracks();
for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++)
@@ -275,7 +275,7 @@ bool AdvancedVideoDecoder::rewind() {
return false;
// Now that we've rewound, start all tracks again
- if (_isPlaying)
+ if (isPlaying())
startAllTracks();
_audioStartOffset = 0;
@@ -285,7 +285,7 @@ bool AdvancedVideoDecoder::rewind() {
}
bool AdvancedVideoDecoder::isSeekable() const {
- if (_tracks.empty())
+ if (!isVideoLoaded())
return false;
for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++)
@@ -302,7 +302,7 @@ bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) {
_needsRewind = false;
// Stop all tracks so they can be seeked
- if (_isPlaying)
+ if (isPlaying())
stopAllTracks();
for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++)
@@ -310,7 +310,7 @@ bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) {
return false;
// Now that we've seeked, start all tracks again
- if (_isPlaying)
+ if (isPlaying())
startAllTracks();
_audioStartOffset = time;
@@ -321,7 +321,7 @@ bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) {
}
void AdvancedVideoDecoder::start() {
- if (_isPlaying || !isVideoLoaded())
+ if (isPlaying() || !isVideoLoaded())
return;
_isPlaying = true;
@@ -336,7 +336,7 @@ void AdvancedVideoDecoder::start() {
}
void AdvancedVideoDecoder::stop() {
- if (!_isPlaying)
+ if (!isPlaying())
return;
_isPlaying = false;