diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-11-11 18:50:04 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-11-11 18:50:04 +0000 |
| commit | 8429cf630b45c70b859f57a91e90892269606e75 (patch) | |
| tree | 66311d462dc83ecdfd308709f832df9f40fc86c9 /src/lib | |
| parent | dc2357286638ad9d158737c5e77e5a19532f57e0 (diff) | |
Speculative fix for slow-downs and large memory consumption.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/player.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 220cf83c0..97d2cbdc0 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -223,6 +223,10 @@ Player::pass () if (_audio) { Time audio_done_up_to = TIME_MAX; for (list<shared_ptr<Piece> >::iterator i = _pieces.begin(); i != _pieces.end(); ++i) { + if ((*i)->decoder->done ()) { + continue; + } + if (dynamic_pointer_cast<AudioDecoder> ((*i)->decoder)) { audio_done_up_to = min (audio_done_up_to, (*i)->audio_position); } |
