Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: third_party/libopenjpeg20/tgt.c

Issue 1338973005: upgrade openjpeg to commit# cf352af (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« third_party/libopenjpeg20/dwt.c ('K') | « third_party/libopenjpeg20/tgt.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libopenjpeg20/tgt.c
diff --git a/third_party/libopenjpeg20/tgt.c b/third_party/libopenjpeg20/tgt.c
index 6143c08a65905b31c4a6ca255aa9a06f4d42e58f..5e34aa91298c6e2e49394c460ec9dc197f9116a9 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;
}
« third_party/libopenjpeg20/dwt.c ('K') | « third_party/libopenjpeg20/tgt.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698