From: Carl Hetherington Date: Mon, 11 Nov 2013 18:50:04 +0000 (+0000) Subject: Speculative fix for slow-downs and large memory consumption. X-Git-Tag: v2.0.48~1159^2 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=8429cf630b45c70b859f57a91e90892269606e75;p=dcpomatic.git Speculative fix for slow-downs and large memory consumption. --- diff --git a/ChangeLog b/ChangeLog index c48bdb89b..07ffc5100 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-11-11 Carl Hetherington + + * Somewhat speculative fix for slow-downs and + large memory consumption with multi-content playlists. + 2013-11-10 Carl Hetherington * 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 >::iterator i = _pieces.begin(); i != _pieces.end(); ++i) { + if ((*i)->decoder->done ()) { + continue; + } + if (dynamic_pointer_cast ((*i)->decoder)) { audio_done_up_to = min (audio_done_up_to, (*i)->audio_position); }