f->track[f->total_tracks - 1] = para_calloc(sizeof(struct mp4_track));
}
-static uint8_t read_char(struct mp4 *f)
+static uint8_t read_int8(struct mp4 *f)
{
uint8_t output;
read_data(f, &output, 1);
if (f->total_tracks == 0)
return f->error++;
t = f->track[f->total_tracks - 1];
- read_char(f); /* version */
+ read_int8(f); /* version */
read_int24(f); /* flags */
t->stsz_sample_size = read_int32(f);
t->stsz_sample_count = read_int32(f);
t = f->track[f->total_tracks - 1];
if (t->stts_entry_count)
return 0;
- read_char(f); /* version */
+ read_int8(f); /* version */
read_int24(f); /* flags */
t->stts_entry_count = read_int32(f);
return f->error++;
t = f->track[f->total_tracks - 1];
- read_char(f); /* version */
+ read_int8(f); /* version */
read_int24(f); /* flags */
t->stsc_entry_count = read_int32(f);
t->stsc_first_chunk = para_malloc(t->stsc_entry_count * sizeof(int32_t));
return f->error++;
t = f->track[f->total_tracks - 1];
- read_char(f); /* version */
+ read_int8(f); /* version */
read_int24(f); /* flags */
t->stco_entry_count = read_int32(f);
t->stco_chunk_offset = para_malloc(t->stco_entry_count
return f->error++;
t = f->track[f->total_tracks - 1];
- for (i = 0; i < 6; i++) {
- read_char(f); /* reserved */
- }
+ for (i = 0; i < 6; i++)
+ read_int8(f); /* reserved */
/* data_reference_index */ read_int16(f);
read_int32(f); /* reserved */
return f->error++;
t = f->track[f->total_tracks - 1];
- read_char(f); /* version */
+ read_int8(f); /* version */
read_int24(f); /* flags */
entry_count = read_int32(f);
destpos = get_position(f) + subsize - header_size;
if (atom_type != ATOM_DATA)
continue;
- read_char(f); /* version */
+ read_int8(f); /* version */
read_int24(f); /* flags */
read_int32(f); /* reserved */
free(data);
uint8_t atom_type;
uint8_t header_size = 0;
- read_char(f); /* version */
+ read_int8(f); /* version */
read_int24(f); /* flags */
while (sumsize < (size - (header_size + 4))) {