func:  nestegg_get_cue_point(nestegg * ctx, unsigned int cluster_num, int64_t int64_t * start_pos, int64_t * end_pos, uint64_t * tstamp) int range_obtained = 0 ; unsigned int cluster_count = 0 ; struct cue_point * cue_point ; struct cue_track_positions * pos ; uint64_t seek_pos , track_number , tc_scale , time ; struct ebml_list_node * cues_node = ctx -> segment . cues . cue_point . head ; unsigned int track = 0 , track_count = 0 , track_index ; if ( ! start_pos || ! end_pos || ! tstamp )  if ( ! cues_node )  cues_node = ctx -> segment . cues . cue_point . head; if ( ! cues_node )  while ( cues_node && ! range_obtained )  cue_point = cues_node -> data; cue_pos_node = cue_point -> cue_track_positions . head; while ( cue_pos_node )  pos = cue_pos_node -> data; for (track = 0; track < track_count; ++track) if ( ne_get_uint ( pos -> track , & track_number ) != 0 )  if ( ne_map_track_number_to_index ( ctx , track_number , & track_index ) != 0 )  if ( track_index == track )  if ( ne_get_uint ( pos -> cluster_position , & seek_pos ) != 0 )  if ( cluster_count == cluster_num )  if ( ne_get_uint ( cue_point -> time , & time ) != 0 )  if ( cluster_count == cluster_num + 1 )  range_obtained = 1; cluster_count ++; cue_pos_node = cue_pos_node -> next; cues_node = cues_node -> next; static ne_map_track_number_to_index(nestegg * unsigned int unsigned int * track_index) struct ebml_list_node * node ; struct track_entry * t_entry ; uint64_t t_number = 0 ; if ( ! track_index )  if ( track_number == 0 )  node = ctx -> segment . tracks . track_entry . head; while ( node )  t_entry = node -> data; if ( ne_get_uint ( t_entry -> number , & t_number ) != 0 )  if ( t_number == track_number )  node = node -> next; static ne_get_uint(struct ebml_type type, uint64_t * value) if ( ! type . read )  assert ( type . type == TYPE_UINT ); 