summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-04-17 16:52:02 +0100
committerCarl Hetherington <cth@carlh.net>2019-04-17 16:52:02 +0100
commit5b68916d71fbaac6c84ffc37e98d4ad42d450961 (patch)
tree7aac1c4d1e19d3dab2e121202e9b4bbb5bad18cd
parent3c5060ce61d208a1752b63b3a13502ca51e75bdf (diff)
Fix errors when adding reels containing audio after referenced reels (#1528).v2.13.147
-rw-r--r--src/lib/player.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 6e6cd75d7..38c4beaae 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -613,8 +613,18 @@ Player::pass ()
switch (which) {
case CONTENT:
+ {
earliest_content->done = earliest_content->decoder->pass ();
+ shared_ptr<DCPContent> dcp = dynamic_pointer_cast<DCPContent>(earliest_content->content);
+ if (dcp && !_play_referenced && dcp->reference_audio()) {
+ /* We are skipping some referenced DCP audio content, so we need to update _last_audio_time
+ to `hide' the fact that no audio was emitted during the referenced DCP (though
+ we need to behave as though it was).
+ */
+ _last_audio_time = dcp->end (_film);
+ }
break;
+ }
case BLACK:
emit_video (black_player_video_frame(EYES_BOTH), _black.position());
_black.set_position (_black.position() + one_video_frame());