- Always return metadata struct, but set asoc to null iff j2k.
This commit is contained in:
parent
ec4aec11e2
commit
58c19b648b
|
@ -10510,8 +10510,13 @@ opj_codestream_info_v2_t* j2k_get_cstr_info(opj_j2k_t* p_j2k)
|
|||
|
||||
opj_jp2_metadata_t* j2k_get_metadata( opj_j2k_t* p_j2k )
|
||||
{
|
||||
/* A J2K stream can not contain jp2 meta data */
|
||||
return NULL;
|
||||
opj_jp2_metadata_t* p_metadata = opj_malloc(sizeof(opj_jp2_metadata_t));
|
||||
|
||||
/* A J2K stream can not contain ASOC boxes */
|
||||
p_metadata->nbasoc = 0;
|
||||
p_metadata->asoc_info = 00;
|
||||
|
||||
return p_metadata;
|
||||
}
|
||||
|
||||
opj_codestream_index_t* j2k_get_cstr_index(opj_j2k_t* p_j2k)
|
||||
|
|
|
@ -799,7 +799,7 @@ opj_codestream_info_v2_t* j2k_get_cstr_info(opj_j2k_t* p_j2k);
|
|||
*
|
||||
*@param p_j2k the component image header to dump.
|
||||
*
|
||||
*@return NULL for j2k streams. The metadata extract from the jpg2000 codec
|
||||
*@return The metadata extract from the jpg2000 codec
|
||||
*/
|
||||
opj_jp2_metadata_t* j2k_get_metadata( opj_j2k_t* p_j2k );
|
||||
|
||||
|
|
|
@ -3387,10 +3387,10 @@ opj_codestream_info_v2_t* jp2_get_cstr_info(opj_jp2_t* p_jp2)
|
|||
return p_info;
|
||||
}
|
||||
|
||||
OPJ_BOOL jp2_copy_asoc_data(opj_jp2_t* p_jp2, opj_codestream_info_v2_t* p_info)
|
||||
opj_jp2_metadata_t* jp2_get_metadata( opj_jp2_t* p_jp2 )
|
||||
{
|
||||
opj_jp2_metadata_t* p_metadata = opj_malloc(sizeof(opj_jp2_metadata_t));
|
||||
jp2_copy_asoc_data( p_jp2, p_metadata );
|
||||
jp2_copy_asoc_data(p_jp2, p_metadata);
|
||||
return p_metadata;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue