]> granicus.if.org Git - openjpeg/commitdiff
WIP: manage the case of event_mgr is not provided to setup_decoder function
authorMickael Savinaud <savmickael@users.noreply.github.com>
Mon, 19 Sep 2011 13:18:19 +0000 (13:18 +0000)
committerMickael Savinaud <savmickael@users.noreply.github.com>
Mon, 19 Sep 2011 13:18:19 +0000 (13:18 +0000)
CHANGES
libopenjpeg/openjpeg.c

diff --git a/CHANGES b/CHANGES
index e8eb6a85c3c1b9652be64abebea6ff97ef27f7cf..6ced318001bf27e9044b36edb05af115073fed8b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,9 +6,8 @@ What's New for OpenJPEG
 + : added
 
 September 19, 2011
++ [mickael] WIP: manage the case of event_mgr is not provided to setup_decoder function 
 + [mickael] WIP: insert elements from V2 framework into the trunk (add missing files). 
-
-September 19, 2011
 + [mickael] Work In Progress: insert elements from V2 framework into the trunk. 
 
 September 9, 2011
index 9c5db9e10c4ac2df2a31656bb1f0cae679c99022..da3fe0d288ba131e96efb8dc000868b8a187d2ab 100644 (file)
@@ -386,7 +386,16 @@ opj_bool OPJ_CALLCONV opj_setup_decoder_v2(opj_codec_t *p_info, opj_dparameters_
                }
 
                l_info->m_codec_data.m_decompression.opj_setup_decoder(l_info->m_codec,parameters);
-               l_info->m_event_mgr = event_mgr;
+
+               if (event_mgr == NULL)
+               {
+                       l_info->m_event_mgr->error_handler = opj_default_callback ;
+                       l_info->m_event_mgr->warning_handler = opj_default_callback ;
+                       l_info->m_event_mgr->info_handler = opj_default_callback ;
+                       l_info->m_event_mgr->client_data = stderr;
+               }
+               else
+                       l_info->m_event_mgr = event_mgr;
                return OPJ_TRUE;
        }
        return OPJ_FALSE;