- shared_ptr<Player> player = _player.lock ();
- DCPOMATIC_ASSERT (player);
- list<StringText> to_show;
- BOOST_FOREACH (PlayerText i, player->closed_captions_for_frame(time)) {
- BOOST_FOREACH (StringText j, i.string) {
- to_show.push_back (j);
+ if (_current_in_lines && _current->second.to > time) {
+ /* Current one is fine */
+ return;
+ }
+
+ if (_current && _current->second.to < time) {
+ /* Current one has finished; clear out */
+ for (int j = 0; j < CLOSED_CAPTION_LINES; ++j) {
+ _lines[j] = "";