fix: Remove zero-size arrays

This commit is contained in:
Antoine Soulier
2023-01-16 13:12:24 -08:00
parent 03a22bf502
commit ba7d0617bd
2 changed files with 6 additions and 6 deletions

View File

@@ -336,7 +336,7 @@ unsigned lc3_encoder_size(int dt_us, int sr_hz)
return 0;
return sizeof(struct lc3_encoder) +
LC3_ENCODER_BUFFER_COUNT(dt_us, sr_hz) * sizeof(float);
(LC3_ENCODER_BUFFER_COUNT(dt_us, sr_hz)-1) * sizeof(float);
}
/**
@@ -622,7 +622,7 @@ unsigned lc3_decoder_size(int dt_us, int sr_hz)
return 0;
return sizeof(struct lc3_decoder) +
LC3_DECODER_BUFFER_COUNT(dt_us, sr_hz) * sizeof(float);
(LC3_DECODER_BUFFER_COUNT(dt_us, sr_hz)-1) * sizeof(float);
}
/**