summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-14 22:16:19 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-14 22:16:19 +0000
commit04cca7e8804b179be3ecb0d2b97d4d69e7fffede (patch)
treeb085fe8a48fa09d33cb051b8bb4aa611d04bd04f /src
parente3619025bb733ccdf1139ca021cbeb8c3ac1fab0 (diff)
Don't take into account audio decoders with no audio when updating audio_done_up_to, otherwise it will await audio from those decoders that never comes.
Diffstat (limited to 'src')
-rw-r--r--src/lib/player.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 56145f5bd..ce5109733 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -224,7 +224,8 @@ Player::pass ()
continue;
}
- if (dynamic_pointer_cast<AudioDecoder> ((*i)->decoder)) {
+ shared_ptr<AudioDecoder> ad = dynamic_pointer_cast<AudioDecoder> ((*i)->decoder);
+ if (ad && ad->has_audio ()) {
audio_done_up_to = min (audio_done_up_to.get_value_or (TIME_MAX), (*i)->audio_position);
}
}