Extend the amount of allowed disagreement between the audio
authorCarl Hetherington <cth@carlh.net>
Tue, 7 Jan 2020 12:30:56 +0000 (13:30 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 7 Jan 2020 12:30:56 +0000 (13:30 +0100)
coming from the content and the calculated periods of silence.

It sees that there is some scope for disagreements here when
trim start/end times are rounded to frame boundaries.

Fixes #1708.

src/lib/player.cc

index baf9b20680b10da6f439c189459569da2b5b2a18..fe08241ab8258bca5ec05cf8865472ef584cc941 100644 (file)
@@ -639,7 +639,8 @@ Player::pass ()
                           remove a little silence at the end of some content.
                        */
                        int64_t const error = labs(period.from.get() - _last_audio_time->get());
-                       int64_t const too_much_error = 4;
+                       /* Let's not worry about less than a frame at 24fps */
+                       int64_t const too_much_error = DCPTime::from_frames(1, 24).get();
                        if (error >= too_much_error) {
                                _film->log()->log(String::compose("Silence starting before or after last audio by %1", error), LogEntry::TYPE_ERROR);
                        }