- chap = cur->data;
-
- if ((ret = av_dynarray_add_nofree(&chapters, &num_chapters, chap)) < 0)
- goto end;
- }
-
- for (i = 0; i < (num_chapters / 2); i++) {
- ID3v2ExtraMetaCHAP *right;
- int right_index;
-
- right_index = (num_chapters - 1) - i;
- right = chapters[right_index];
-
- chapters[right_index] = chapters[i];
- chapters[i] = right;
- }