diff options
author | Jun Fang <jun_fang@foxitsoftware.com> | 2015-10-13 15:28:55 +0800 |
---|---|---|
committer | Jun Fang <jun_fang@foxitsoftware.com> | 2015-10-13 00:49:26 -0700 |
commit | e865ed12c4a476a4c74bf1ae97d3a6fa8ca06f0a (patch) | |
tree | 9b2bad54f5afe41a627b0848347c3442f3c33635 /third_party/libopenjpeg20/tgt.c | |
parent | a8a39e25af3c19bb91434fdf367cffa0e1536934 (diff) | |
download | pdfium-e865ed12c4a476a4c74bf1ae97d3a6fa8ca06f0a.tar.xz |
upgrade openjpeg to commit# cf352af
BUG=457480,497355
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1338973005 .
Diffstat (limited to 'third_party/libopenjpeg20/tgt.c')
-rw-r--r-- | third_party/libopenjpeg20/tgt.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/third_party/libopenjpeg20/tgt.c b/third_party/libopenjpeg20/tgt.c index 6143c08a65..5e34aa9129 100644 --- a/third_party/libopenjpeg20/tgt.c +++ b/third_party/libopenjpeg20/tgt.c @@ -45,7 +45,7 @@ ========================================================== */ -opj_tgt_tree_t *opj_tgt_create(OPJ_UINT32 numleafsh, OPJ_UINT32 numleafsv) { +opj_tgt_tree_t *opj_tgt_create(OPJ_UINT32 numleafsh, OPJ_UINT32 numleafsv, opj_event_mgr_t *manager) { OPJ_INT32 nplh[32]; OPJ_INT32 nplv[32]; opj_tgt_node_t *node = 00; @@ -59,7 +59,7 @@ opj_tgt_tree_t *opj_tgt_create(OPJ_UINT32 numleafsh, OPJ_UINT32 numleafsv) { tree = (opj_tgt_tree_t *) opj_calloc(1,sizeof(opj_tgt_tree_t)); if(!tree) { - fprintf(stderr, "ERROR in tgt_create while allocating tree\n"); + opj_event_msg(manager, EVT_ERROR, "Not enough memory to create Tag-tree\n"); return 00; } @@ -81,13 +81,13 @@ opj_tgt_tree_t *opj_tgt_create(OPJ_UINT32 numleafsh, OPJ_UINT32 numleafsv) { /* ADD */ if (tree->numnodes == 0) { opj_free(tree); - fprintf(stderr, "WARNING in tgt_create tree->numnodes == 0, no tree created.\n"); + opj_event_msg(manager, EVT_WARNING, "tgt_create tree->numnodes == 0, no tree created.\n"); return 00; } tree->nodes = (opj_tgt_node_t*) opj_calloc(tree->numnodes, sizeof(opj_tgt_node_t)); if(!tree->nodes) { - fprintf(stderr, "ERROR in tgt_create while allocating node of the tree\n"); + opj_event_msg(manager, EVT_ERROR, "Not enough memory to create Tag-tree nodes\n"); opj_free(tree); return 00; } @@ -130,7 +130,7 @@ opj_tgt_tree_t *opj_tgt_create(OPJ_UINT32 numleafsh, OPJ_UINT32 numleafsv) { * @param p_num_leafs_v the height of the array of leafs of the tree * @return a new tag-tree if successful, NULL otherwise */ -opj_tgt_tree_t *opj_tgt_init(opj_tgt_tree_t * p_tree,OPJ_UINT32 p_num_leafs_h, OPJ_UINT32 p_num_leafs_v) +opj_tgt_tree_t *opj_tgt_init(opj_tgt_tree_t * p_tree,OPJ_UINT32 p_num_leafs_h, OPJ_UINT32 p_num_leafs_v, opj_event_mgr_t *p_manager) { OPJ_INT32 l_nplh[32]; OPJ_INT32 l_nplv[32]; @@ -175,7 +175,7 @@ opj_tgt_tree_t *opj_tgt_init(opj_tgt_tree_t * p_tree,OPJ_UINT32 p_num_leafs_h, O if (l_node_size > p_tree->nodes_size) { opj_tgt_node_t* new_nodes = (opj_tgt_node_t*) opj_realloc(p_tree->nodes, l_node_size); if (! new_nodes) { - fprintf(stderr, "ERROR Not enough memory to reinitialize the tag tree\n"); + opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to reinitialize the tag tree\n"); opj_tgt_destroy(p_tree); return 00; } |