The single caller resets the file offset after the call, so we may
stop reading the atom after we've parsed the last field of interest,
which happens to be the sample rate.
{
int ret;
int32_t i;
- uint8_t atom_type = 0;
struct mp4_track *t;
if (f->total_tracks == 0)
ret = read_int16(f, NULL);
if (ret <= 0)
return ret;
- ret = read_int16(f, &t->sampleRate);
- if (ret <= 0)
- return ret;
- ret = read_int16(f, NULL);
- if (ret <= 0)
- return ret;
- return atom_read_header(f, &atom_type, NULL, NULL);
+ return read_int16(f, &t->sampleRate);
}
static int read_stsd(struct mp4 *f)