- mp4ff_read_int32(f); /* reserved */
-
- /* some need special attention */
- if (parent_atom_type == ATOM_GENRE2 || parent_atom_type == ATOM_TEMPO) {
- if (subsize - header_size >= 8 + 2) {
- uint16_t val = mp4ff_read_int16(f);
-
- if (parent_atom_type == ATOM_TEMPO) {
- char temp[16];
- sprintf(temp,
- "%.5u BPM",
- val);
- mp4ff_tag_add_field(&(f-> tags), "tempo", temp, -1);
- } else {
- const char *temp = mp4ff_meta_index_to_genre(val);
- if (temp) {
- mp4ff_tag_add_field (&(f->tags), "genre", temp, -1);
- }
+ free(name);
+ name = mp4ff_read_string(f, (uint32_t) (subsize - (header_size + 4)));
+ continue;
+ }
+ if (atom_type != ATOM_DATA)
+ continue;
+ mp4ff_read_char(f); /* version */
+ mp4ff_read_int24(f); /* flags */
+ mp4ff_read_int32(f); /* reserved */
+
+ /* some need special attention */
+ if (parent_atom_type == ATOM_GENRE2 || parent_atom_type == ATOM_TEMPO) {
+ if (subsize - header_size >= 8 + 2) {
+ uint16_t val = mp4ff_read_int16(f);
+
+ if (parent_atom_type == ATOM_TEMPO) {
+ char temp[16];
+ sprintf(temp,
+ "%.5u BPM",
+ val);
+ mp4ff_tag_add_field(&(f-> tags), "tempo", temp, -1);
+ } else {
+ const char *temp = mp4ff_meta_index_to_genre(val);
+ if (temp) {
+ mp4ff_tag_add_field (&(f->tags), "genre", temp, -1);