projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
44662dc
)
Add a warning log when an assertion gets hit.
author
Carl Hetherington
<cth@carlh.net>
Thu, 19 Sep 2019 22:11:25 +0000
(
00:11
+0200)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 19 Sep 2019 22:35:08 +0000
(
00:35
+0200)
Forward-ported from
4141f01e25abd5050db09ff85da47ff059909669
in master.
src/lib/player.cc
patch
|
blob
|
history
diff --git
a/src/lib/player.cc
b/src/lib/player.cc
index fd9ffb9ed4f65cb23e27affa79001e9fd7317609..b3fba1aece638df97a57b522f9fda0f31cd352ba 100644
(file)
--- a/
src/lib/player.cc
+++ b/
src/lib/player.cc
@@
-649,7
+649,11
@@
Player::pass ()
/* Sometimes the thing that happened last finishes fractionally before
or after this silence. Bodge the start time of the silence to fix it.
*/
/* Sometimes the thing that happened last finishes fractionally before
or after this silence. Bodge the start time of the silence to fix it.
*/
- DCPOMATIC_ASSERT (labs(period.from.get() - _last_audio_time->get()) < 2);
+ int64_t const error = labs(period.from.get() - _last_audio_time->get());
+ if (error >= 2) {
+ _film->log()->log(String::compose("Silence starting before or after last audio by %1", error), LogEntry::TYPE_ERROR);
+ }
+ DCPOMATIC_ASSERT (error < 2);
period.from = *_last_audio_time;
}
if (period.duration() > one_video_frame()) {
period.from = *_last_audio_time;
}
if (period.duration() > one_video_frame()) {