summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-07-14 23:48:10 +0100
committerCarl Hetherington <cth@carlh.net>2013-07-14 23:48:10 +0100
commit05b7e2aa4b4c0053ed822cdcc891cd29e8348ab4 (patch)
tree2cb1f4cf755813c274e7760c81b338e3b8f21213 /src
parenta8b5ac47b89927eb2495dba71393a8a073967560 (diff)
Don't decode things if they are not enabled.
Diffstat (limited to 'src')
-rw-r--r--src/lib/player.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index c8c206424..8fd5715d4 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -138,7 +138,7 @@ Player::pass ()
continue;
}
- if (dynamic_pointer_cast<VideoDecoder> ((*i)->decoder)) {
+ if (_video && dynamic_pointer_cast<VideoDecoder> ((*i)->decoder)) {
if ((*i)->video_position < earliest_t) {
earliest_t = (*i)->video_position;
earliest = *i;
@@ -146,7 +146,7 @@ Player::pass ()
}
}
- if (dynamic_pointer_cast<AudioDecoder> ((*i)->decoder)) {
+ if (_audio && dynamic_pointer_cast<AudioDecoder> ((*i)->decoder)) {
if ((*i)->audio_position < earliest_t) {
earliest_t = (*i)->audio_position;
earliest = *i;