diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-01-14 22:16:19 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-01-14 22:16:19 +0000 |
| commit | 04cca7e8804b179be3ecb0d2b97d4d69e7fffede (patch) | |
| tree | b085fe8a48fa09d33cb051b8bb4aa611d04bd04f /src/lib | |
| parent | e3619025bb733ccdf1139ca021cbeb8c3ac1fab0 (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/lib')
| -rw-r--r-- | src/lib/player.cc | 3 |
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); } } |
