Speculative fix for slow-downs and large memory consumption.
authorCarl Hetherington <cth@carlh.net>
Mon, 11 Nov 2013 18:50:04 +0000 (18:50 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 11 Nov 2013 18:50:04 +0000 (18:50 +0000)
ChangeLog
src/lib/player.cc

index c48bdb89bf0f1b538e1aa7419dcc0dfeec081a61..07ffc5100b6f7ad23598fb50e2fa21fb4cd22eae 100644 (file)
--- 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
index 220cf83c0ad6c58814fd96eef768aa32404f182f..97d2cbdc0086a9e13058116839feb950910dbfdd 100644 (file)
@@ -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);
                        }