From: Andre Noll Date: Sun, 11 Jun 2017 14:10:40 +0000 (+0200) Subject: wma: Drop unused argument from wma_decode_superframe(). X-Git-Tag: v0.6.1~44^2~4 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=8587c4fc6828528c0356bc88e9c8f8e8ab10b2e9;p=paraslash.git wma: Drop unused argument from wma_decode_superframe(). The function depends on the caller not passing a smaller value than the packet size - WMA_FRAME_SKIP, and only uses this many input bytes anyway. So we may get rid of the input size argument. --- diff --git a/wmadec_filter.c b/wmadec_filter.c index a76f77df..0c96dc6c 100644 --- a/wmadec_filter.c +++ b/wmadec_filter.c @@ -1041,12 +1041,11 @@ static int wma_decode_frame(struct private_wmadec_data *pwd, int16_t *samples) } static int wma_decode_superframe(struct private_wmadec_data *pwd, void *data, - int *data_size, const uint8_t *buf, int buf_size) + int *data_size, const uint8_t *buf) { - int ret; + int ret, buf_size = pwd->ahi.packet_size - WMA_FRAME_SKIP; int16_t *samples; - buf_size = pwd->ahi.packet_size - WMA_FRAME_SKIP; samples = data; init_get_bits(&pwd->gb, buf, buf_size); if (pwd->ahi.use_bit_reservoir) { @@ -1217,7 +1216,7 @@ next_buffer: out_size = WMA_OUTPUT_BUFFER_SIZE; out = para_malloc(out_size); ret = wma_decode_superframe(pwd, out, &out_size, - (uint8_t *)in + WMA_FRAME_SKIP, len - WMA_FRAME_SKIP); + (uint8_t *)in + WMA_FRAME_SKIP); if (ret < 0) { free(out); goto err;