summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-11-23 23:24:29 +0100
committerCarl Hetherington <cth@carlh.net>2020-11-23 23:24:29 +0100
commite2839443a595c9094d119d3554e4866015ed4cce (patch)
treebc629bcc8777446e95c072f97c561ad9ec2c5bee /src
parented5681ddd7d9db1482c4fd14dbfb60b1cb259b49 (diff)
Fix a type-punning warning.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/AS_DCP_JP2K.cpp4
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);