diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-11-23 23:24:29 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-11-23 23:24:29 +0100 |
| commit | e2839443a595c9094d119d3554e4866015ed4cce (patch) | |
| tree | bc629bcc8777446e95c072f97c561ad9ec2c5bee /src | |
| parent | ed5681ddd7d9db1482c4fd14dbfb60b1cb259b49 (diff) | |
Fix a type-punning warning.
Diffstat (limited to 'src')
| -rwxr-xr-x | src/AS_DCP_JP2K.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/AS_DCP_JP2K.cpp b/src/AS_DCP_JP2K.cpp index 7dcd5ee..cf2b246 100755 --- a/src/AS_DCP_JP2K.cpp +++ b/src/AS_DCP_JP2K.cpp @@ -232,7 +232,9 @@ ASDCP::JP2K_PDesc_to_MD(const JP2K::PictureDescriptor& PDesc, const ui32_t tmp_buffer_len = 1024; byte_t tmp_buffer[tmp_buffer_len]; - *(ui32_t*)tmp_buffer = KM_i32_BE(MaxComponents); // three components + ui32_t* tmp_buffer_ui32 = (ui32_t*) tmp_buffer; + + *tmp_buffer_ui32 = KM_i32_BE(MaxComponents); // three components *(ui32_t*)(tmp_buffer+4) = KM_i32_BE(sizeof(ASDCP::JP2K::ImageComponent_t)); memcpy(tmp_buffer + 8, &PDesc.ImageComponents, sizeof(ASDCP::JP2K::ImageComponent_t) * MaxComponents); |
