+/**
+ * Return the number of milliseconds of the given track.
+ *
+ * \param f As returned by \ref mp4ff_open_read(), must not be NULL.
+ * \param track Between zero and the value returned by \ref mp4ff_total_tracks().
+ *
+ * The function returns zero if the audio file is of zero length or contains a
+ * corrupt track header.
+ */
+uint64_t mp4ff_get_duration(const struct mp4ff *f, int32_t track)
+{
+ const struct mp4ff_track *t = f->track[track];
+
+ if (t->timeScale == 0)
+ return 0;
+ return t->duration * 1000 / t->timeScale;
+}
+
+void mp4ff_set_sample_position(struct mp4ff *f, int32_t track, int32_t sample)