commit
ae71bb88a6
|
@ -2676,7 +2676,8 @@ static OPJ_BOOL opj_jp2_read_asoc( opj_jp2_t *jp2,
|
|||
assert(p_manager != 00);
|
||||
|
||||
if (p_header_size < 8) {
|
||||
opj_event_msg(p_manager, EVT_ERROR, "Cannot handle ASOC box of less than 8 bytes\n");
|
||||
opj_event_msg(p_manager, EVT_ERROR,
|
||||
"Cannot handle ASOC box of less than 8 bytes\n");
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
|
@ -2685,7 +2686,8 @@ static OPJ_BOOL opj_jp2_read_asoc( opj_jp2_t *jp2,
|
|||
p_header_size -= 4;
|
||||
|
||||
if (p_header_size < asoc_size) {
|
||||
opj_event_msg(p_manager, EVT_ERROR, "ASOC super box is smaller than containing sub box\n");
|
||||
opj_event_msg(p_manager, EVT_ERROR,
|
||||
"ASOC super box is smaller than containing sub box\n");
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
|
@ -2696,7 +2698,8 @@ static OPJ_BOOL opj_jp2_read_asoc( opj_jp2_t *jp2,
|
|||
|
||||
if (label_tag != JP2_LBL) {
|
||||
/* TODO: Verify that ASOC must have a following label ? */
|
||||
opj_event_msg(p_manager, EVT_WARNING, "ASOC data does not have a label (LBL)\n");
|
||||
opj_event_msg(p_manager, EVT_WARNING,
|
||||
"ASOC data does not have a label (LBL)\n");
|
||||
return OPJ_TRUE; // No error if we could not parse
|
||||
}
|
||||
|
||||
|
@ -2711,7 +2714,8 @@ static OPJ_BOOL opj_jp2_read_asoc( opj_jp2_t *jp2,
|
|||
}
|
||||
|
||||
asoc = &(jp2->asoc[jp2->numasoc - 1]);
|
||||
asoc->level = jp2->numasoc-1; /* TODO: This is not correct if a parent asoc contains multiple child asocs! */
|
||||
asoc->level = jp2->numasoc -
|
||||
1; /* TODO: This is not correct if a parent asoc contains multiple child asocs! */
|
||||
asoc->label_length = asoc_size + 1;
|
||||
asoc->label = opj_malloc(asoc_size);
|
||||
memcpy(asoc->label, p_header_data, asoc_size);
|
||||
|
@ -2723,7 +2727,8 @@ static OPJ_BOOL opj_jp2_read_asoc( opj_jp2_t *jp2,
|
|||
p_header_size -= asoc_size;
|
||||
|
||||
if (p_header_size < 4) {
|
||||
opj_event_msg(p_manager, EVT_ERROR, "Cannot handle ASOC sub box of less than 4 bytes\n");
|
||||
opj_event_msg(p_manager, EVT_ERROR,
|
||||
"Cannot handle ASOC sub box of less than 4 bytes\n");
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -961,7 +961,8 @@ void OPJ_CALLCONV opj_dump_associated_data(
|
|||
if (cstr_info->asoc_info) {
|
||||
fprintf(output_stream, "\n\nAssociated data: {\n");
|
||||
for (i = 0; i < cstr_info->nbasoc; i++) {
|
||||
fprintf(output_stream, "\tlabel=%s, xml/data=", (char*) cstr_info->asoc_info[i].label);
|
||||
fprintf(output_stream, "\tlabel=%s, xml/data=",
|
||||
(char*) cstr_info->asoc_info[i].label);
|
||||
if (cstr_info->asoc_info[i].xml_buf) {
|
||||
fprintf(output_stream, "%s\n", (char*) cstr_info->asoc_info[i].xml_buf);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue