noobdoesre / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

opj_image vs free #146

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the following patch:

http://code.google.com/p/openjpeg/source/detail?r=1659#

we are doing:

11832       -       p_j2k->m_private_image = p_image;
12092   +       p_j2k->m_private_image = opj_image_create0();
12093   +       opj_copy_image_header(p_image, p_j2k->m_private_image);
12094   +   
12095   +       // TODO_MSD: Find a better way
12096   +       if (p_image->comps) {
12097   +           OPJ_UINT32 it_comp;
12098   +           for (it_comp = 0 ; it_comp < p_image->numcomps; it_comp++) {
12099   +               if (p_image->comps[it_comp].data) {
12100   +                   p_j2k->m_private_image->comps[it_comp].data 
=p_image->comps[it_comp].data;
12101   +                   p_image->comps[it_comp].data = NULL;
12102   +   
12103   +               }
12104   +           }
12105   +       }

This should be fixed.

Original issue reported on code.google.com by mathieu.malaterre on 14 May 2012 at 7:25

GoogleCodeExporter commented 9 years ago
I cannot remember what should have been done in the first place. closing for 
now.

Original comment by mathieu.malaterre on 25 Feb 2014 at 4:06