diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-12-21 00:12:41 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-12-22 23:16:45 +0100 |
| commit | f657337815c5f21e2edd99fdaa501f0ff8acc6b1 (patch) | |
| tree | f14f69f5befa0862c7fa1614c59992e1cd4e6534 /src | |
| parent | 6518f7e4e8b02a1d78b6121c2032fa27c50ddc78 (diff) | |
Set plaintext offset to 0 when writing J2K frames (DoM #2391)
Without this the EasyDCP verifier gives errors like
"sum of individual components is larger than the file size"
This change results in there being no plaintext metadata in each
encoded frame. It looks like the DCP-2000 was fixed in around
2010 to not crash with plaintext metadata, and the asdcplib tools
at some point started defaulting to this behaviour also.
Diffstat (limited to 'src')
| -rw-r--r-- | src/mono_picture_asset_writer.cc | 2 | ||||
| -rw-r--r-- | src/stereo_picture_asset_writer.cc | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/mono_picture_asset_writer.cc b/src/mono_picture_asset_writer.cc index dd29c19a..7fd58114 100644 --- a/src/mono_picture_asset_writer.cc +++ b/src/mono_picture_asset_writer.cc @@ -106,6 +106,8 @@ MonoPictureAssetWriter::write (uint8_t const * data, int size) boost::throw_exception (MiscError ("could not parse J2K frame")); } + _state->frame_buffer.PlaintextOffset(0); + uint64_t const before_offset = _state->mxf_writer.Tell (); string hash; diff --git a/src/stereo_picture_asset_writer.cc b/src/stereo_picture_asset_writer.cc index b9120cd9..6ee271bc 100644 --- a/src/stereo_picture_asset_writer.cc +++ b/src/stereo_picture_asset_writer.cc @@ -100,6 +100,8 @@ StereoPictureAssetWriter::write (uint8_t const * data, int size) boost::throw_exception (MiscError ("could not parse J2K frame")); } + _state->frame_buffer.PlaintextOffset(0); + uint64_t const before_offset = _state->mxf_writer.Tell (); string hash; |
