]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - mp4.c
mp4: Rename mp4_open_read() to mp4_open().
[paraslash.git] / mp4.c
diff --git a/mp4.c b/mp4.c
index 9e33eb4c298e49ad5fd2f8ed40824200966e1d03..2121155ccebeed885c78221e994e81acca3de846 100644 (file)
--- a/mp4.c
+++ b/mp4.c
@@ -617,7 +617,7 @@ fail:
        return ret;
 }
 
-int mp4_open_read(const struct mp4_callback *cb, struct mp4 **result)
+int mp4_open(const struct mp4_callback *cb, struct mp4 **result)
 {
        struct mp4 *f;
        int ret;
@@ -722,12 +722,7 @@ uint16_t mp4_get_channel_count(const struct mp4 *f)
 
 uint32_t mp4_num_samples(const struct mp4 *f)
 {
-       const struct mp4_track *t = &f->track;
-       uint32_t total = 0;
-
-       for (uint32_t n = 0; n < t->stts_entry_count; n++)
-               total += t->stts_sample_count[n];
-       return total;
+       return f->track.stsz_sample_count;
 }
 
 int mp4_open_meta(const struct mp4_callback *cb, struct mp4 **result)
@@ -874,7 +869,7 @@ static int write_data(struct mp4 *f, void *data, size_t size)
        return 1;
 }
 
-int mp4_meta_update(struct mp4 *f)
+int mp4_update_meta(struct mp4 *f)
 {
        void *new_moov_data;
        uint32_t new_moov_size;