]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
aac: Let mp4ff_set_sample_position() return void.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 9 Aug 2021 16:45:34 +0000 (18:45 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 May 2022 19:37:35 +0000 (21:37 +0200)
The function used to always return zero.

aac_afh.c
mp4.c
mp4.h

index b16cea27371b3d329ca36fcddb1c6d8c9b881c67..5b5fd47ef3e23d330386a794b049e78256321120 100644 (file)
--- a/aac_afh.c
+++ b/aac_afh.c
@@ -116,7 +116,6 @@ static int aac_afh_get_chunk(uint32_t chunk_num, void *afh_context,
        size_t offset;
 
        assert(chunk_num <= INT_MAX);
-       /* this function always returns zero */
        mp4ff_set_sample_position(c->mp4ff, c->track, chunk_num);
        offset = c->fpos;
        ss = mp4ff_read_sample_getsize(c->mp4ff, c->track, chunk_num);
diff --git a/mp4.c b/mp4.c
index e6f6a0b7a7cc14b492530f881d60d88049170570..761eb375a615942175d3aa2a247aa5a12f1fda3d 100644 (file)
--- a/mp4.c
+++ b/mp4.c
@@ -1502,15 +1502,11 @@ static int32_t mp4ff_sample_to_offset(const mp4ff_t * f, const int32_t track,
        return chunk_offset2;
 }
 
-int32_t mp4ff_set_sample_position(mp4ff_t * f, const int32_t track,
-                                 const int32_t sample)
+void mp4ff_set_sample_position(mp4ff_t *f, const int32_t track,
+               const int32_t sample)
 {
-       int32_t offset;
-
-       offset = mp4ff_sample_to_offset(f, track, sample);
+       int32_t offset = mp4ff_sample_to_offset(f, track, sample);
        mp4ff_set_position(f, offset);
-
-       return 0;
 }
 
 static int32_t mp4ff_audio_frame_size(const mp4ff_t * f, const int32_t track,
diff --git a/mp4.h b/mp4.h
index c3897011d2264ea60126386acb3bb30857c04096..43874a03566468f7f0fead4a0aa167763ede7707 100644 (file)
--- a/mp4.h
+++ b/mp4.h
@@ -99,7 +99,7 @@ typedef struct
     mp4ff_metadata_t tags;
 } mp4ff_t;
 
-int32_t mp4ff_set_sample_position(mp4ff_t *f, const int32_t track, const int32_t sample);
+void mp4ff_set_sample_position(mp4ff_t *f, const int32_t track, const int32_t sample);
 int32_t mp4ff_total_tracks(const mp4ff_t *f);
 void mp4ff_get_decoder_config(const mp4ff_t *f, const int track,
                unsigned char** ppBuf, unsigned int* pBufSize);