Remove call to fill_audio which goes wrong with multi-audio-stream content.
authorCarl Hetherington <cth@carlh.net>
Tue, 30 May 2017 09:11:01 +0000 (10:11 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 30 May 2017 09:11:01 +0000 (10:11 +0100)
This call just doesn't take multi-stream into account.  Removing it does
not trip any tests so I think it may be superfluous...

src/lib/player.cc

index 95ff55bc5e26f7d3e8d7bf30945eadcb518a1d7f..de221fef357c17ed849725f9d57376f07786b8b0 100644 (file)
@@ -743,12 +743,6 @@ Player::audio_transform (shared_ptr<AudioContent> content, AudioStreamPtr stream
                content_audio.audio = _audio_processor->run (content_audio.audio, _film->audio_channels ());
        }
 
-       /* Pad any gap which may be caused by audio delay */
-
-       if (_last_audio_time) {
-               fill_audio (DCPTimePeriod (*_last_audio_time, time));
-       }
-
        /* Push */
 
        _audio_merger.push (content_audio.audio, time);
@@ -950,6 +944,8 @@ Player::fill_audio (DCPTimePeriod period)
                return;
        }
 
+       DCPOMATIC_ASSERT (period.from < period.to);
+
        BOOST_FOREACH (DCPTimePeriod i, subtract(period, _no_audio)) {
                DCPTime t = i.from;
                while (t < i.to) {