From e1448dff981e0f51c6de02ac8097a646f60a10a1 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 9 Aug 2021 18:45:34 +0200 Subject: [PATCH] aac: Let mp4ff_set_sample_position() return void. The function used to always return zero. --- aac_afh.c | 1 - mp4.c | 10 +++------- mp4.h | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/aac_afh.c b/aac_afh.c index b16cea27..5b5fd47e 100644 --- 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 e6f6a0b7..761eb375 100644 --- 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 c3897011..43874a03 100644 --- 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); -- 2.39.2