Update the README.cmake file : an instruction was missing to run the tests correctly.
[openjpeg.git] / libopenjpeg / t2.c
index be9b42a41327b2f85aeea820a83eb04225673e98..a76f4ed26cbe2beb88437e887a1a6849ce335cdf 100644 (file)
@@ -614,6 +614,7 @@ int t2_encode_packets(opj_t2_t* t2,int tileno, opj_tcd_tile_t *tile, int maxlaye
                                int tpnum = compno;
                                if (pi_create_encode(pi, cp,tileno,poc,tpnum,tppos,t2_mode,cur_totnum_tp)) {
                                        opj_event_msg(t2->cinfo, EVT_ERROR, "Error initializing Packet Iterator\n");
+                                       pi_destroy(pi, cp, tileno);
                                        return -999;
                                }
                                while (pi_next(&pi[poc])) {