]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - mp4.c
mp4: Remove member moov_read of struct mp4ff.
[paraslash.git] / mp4.c
diff --git a/mp4.c b/mp4.c
index 761eb375a615942175d3aa2a247aa5a12f1fda3d..cdcfa6511abdae0ffc0dbfd8ac77be1288d39427 100644 (file)
--- a/mp4.c
+++ b/mp4.c
@@ -1289,7 +1289,6 @@ static int32_t parse_atoms(mp4ff_t * f, int meta_only)
                f->last_atom = atom_type;
 
                if (atom_type == ATOM_MOOV && size > header_size) {
-                       f->moov_read = 1;
                        f->moov_offset = mp4ff_position(f) - header_size;
                        f->moov_size = size;
                }
@@ -1509,28 +1508,13 @@ void mp4ff_set_sample_position(mp4ff_t *f, const int32_t track,
        mp4ff_set_position(f, offset);
 }
 
-static int32_t mp4ff_audio_frame_size(const mp4ff_t * f, const int32_t track,
-               const int32_t sample)
+int32_t mp4ff_get_sample_size(const mp4ff_t *f, int track, int sample)
 {
-       int32_t bytes;
-       const mp4ff_track_t *p_track = f->track[track];
-
-       if (p_track->stsz_sample_size) {
-               bytes = p_track->stsz_sample_size;
-       } else {
-               bytes = p_track->stsz_table[sample];
-       }
+       const mp4ff_track_t *t = f->track[track];
 
-       return bytes;
-}
-
-int32_t mp4ff_read_sample_getsize(mp4ff_t * f, const int track,
-                                 const int sample)
-{
-       int32_t temp = mp4ff_audio_frame_size(f, track, sample);
-       if (temp < 0)
-               temp = 0;
-       return temp;
+       if (t->stsz_sample_size != 0)
+               return t->stsz_sample_size;
+       return t->stsz_table[sample];
 }
 
 uint32_t mp4ff_get_sample_rate(const mp4ff_t * f, const int32_t track)