diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-01-10 20:44:55 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-01-10 20:44:55 +0100 |
| commit | 0f6a26d4ac4a34b69f977f458a4ac009bc4e4170 (patch) | |
| tree | 4145922ab4768800c36e50abafea430b5f12b6d8 | |
| parent | 1e98890c45d8bf9651a596ff68486d4f1d25cd10 (diff) | |
Fix crashes when using kdm_cli with a certificate instead of a cinema.
| -rw-r--r-- | src/tools/dcpomatic_kdm_cli.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tools/dcpomatic_kdm_cli.cc b/src/tools/dcpomatic_kdm_cli.cc index d0b60366b..5f12e3f96 100644 --- a/src/tools/dcpomatic_kdm_cli.cc +++ b/src/tools/dcpomatic_kdm_cli.cc @@ -335,6 +335,12 @@ from_dkdm ( continue; } + int const offset_hour = i->cinema ? i->cinema->utc_offset_hour() : 0; + int const offset_minute = i->cinema ? i->cinema->utc_offset_minute() : 0; + + dcp::LocalTime begin(valid_from, offset_hour, offset_minute); + dcp::LocalTime end(valid_to, offset_hour, offset_minute); + screen_kdms.push_back ( ScreenKDM ( i, @@ -342,8 +348,8 @@ from_dkdm ( dkdm, i->recipient.get(), i->trusted_device_thumbprints(), - dcp::LocalTime(valid_from, i->cinema->utc_offset_hour(), i->cinema->utc_offset_minute()), - dcp::LocalTime(valid_to, i->cinema->utc_offset_hour(), i->cinema->utc_offset_minute()), + begin, + end, formulation, disable_forensic_marking_picture, disable_forensic_marking_audio |
