Ejemplo n.º 1
0
boxlist_param_t * get_boxstructure( int fd, Byte8_t offset, Byte8_t length)
{
  boxlist_param_t *boxlist;
  box_param_t *box;
  int pos;
  
  boxlist = NULL;
  pos = offset;
  do{
    if(!(box = gene_boxbyOffset( fd, pos)))
      break;
    
    pos += box->length;
    
    if( !boxlist)
      boxlist = gene_boxlist();
    insert_box_into_list( box, boxlist);
  }while( pos < offset+length);

  return boxlist;
}
Ejemplo n.º 2
0
boxlist_param_t * get_boxstructure( int fd, OPJ_OFF_T offset, OPJ_SIZE_T length)
{
  boxlist_param_t *boxlist;
  box_param_t *box;
  OPJ_OFF_T pos;
  
  boxlist = NULL;
  pos = offset;
  assert( (OPJ_OFF_T)length>=0);
  do{
    if(!(box = gene_boxbyOffset( fd, pos)))
      break;
    
    assert( (OPJ_OFF_T)box->length >= 0);
    pos += (OPJ_OFF_T)box->length;
    
    if( !boxlist)
      boxlist = gene_boxlist();
    insert_box_into_list( box, boxlist);
  }while( pos < offset+(OPJ_OFF_T)length);

  return boxlist;
}