summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/codec
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxcodec/codec')
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpeg.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
index 7e95bd358f..efd83f88ae 100644
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -601,8 +601,7 @@ void* CCodec_JpegModule::Start() {
if (m_pExtProvider) {
return m_pExtProvider->Start();
}
- FXJPEG_Context* p =
- (FXJPEG_Context*)FX_Alloc(uint8_t, sizeof(FXJPEG_Context));
+ FXJPEG_Context* p = FX_Alloc(FXJPEG_Context, 1);
p->m_AllocFunc = jpeg_alloc_func;
p->m_FreeFunc = jpeg_free_func;
p->m_ErrMgr.error_exit = _error_fatal1;