summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-11-11 18:50:04 +0000
committerCarl Hetherington <cth@carlh.net>2013-11-11 18:50:04 +0000
commit8429cf630b45c70b859f57a91e90892269606e75 (patch)
tree66311d462dc83ecdfd308709f832df9f40fc86c9
parentdc2357286638ad9d158737c5e77e5a19532f57e0 (diff)
Speculative fix for slow-downs and large memory consumption.
-rw-r--r--ChangeLog5
-rw-r--r--src/lib/player.cc4
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c48bdb89b..07ffc5100 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-11 Carl Hetherington <cth@carlh.net>
+
+ * Somewhat speculative fix for slow-downs and
+ large memory consumption with multi-content playlists.
+
2013-11-10 Carl Hetherington <cth@carlh.net>
* Hopefully get rid of spurious black lines around
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);
}