~josejuan-sanchez/esajpip/emptypackets

« back to all changes in this revision

Viewing changes to src/jpeg2000/image_index.cc

  • Committer: José Juan Sánchez Hernández
  • Date: 2012-07-18 11:40:37 UTC
  • Revision ID: josejuan.sanchez@gmail.com-20120718114037-mslgs1evd0gwjp2y
Modifications to control empty packets

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
        }
89
89
 
90
90
        uint64_t length_packet = 0;
91
 
 
92
91
        while (packet_indexes[ind_codestream].Size() <= max_index)
93
92
        {
94
93
          //GetPLTLength(file, ind_codestream, &length_packet);
95
94
          res = res && GetPLTLength(file, ind_codestream, &length_packet);
96
95
          GetOffsetPacket(file, ind_codestream, length_packet);
97
96
        }
98
 
 
99
97
        file.Close();
100
98
    }
101
99
 
164
162
    if (hyper_links.size()>0)
165
163
    {
166
164
        if(packet.resolution > hyper_links[num_codestream]->max_resolution.back()) {
167
 
                if(!hyper_links[num_codestream]->BuildIndex(0,packet.resolution))
 
165
                if(!hyper_links[num_codestream]->BuildIndex(0,packet.resolution))
168
166
                        ERROR("The packet index could not be created");
169
167
                hyper_links[num_codestream]->max_resolution.back() = packet.resolution;
170
168
        }
198
196
            }
199
197
        }
200
198
    }
201
 
 
202
199
    return segment;
203
200
  }
204
201