Skip to content

Commit

Permalink
Fix C99 compat. Fixes: #42
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Jul 25, 2024
1 parent 3d7ccd2 commit 91527f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion swresample/swresample_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,13 @@ static int get_in_samples_ba(swr_t *swr, value *in_vector, int offset) {
static int get_in_samples_planar_ba(swr_t *swr, value *in_vector, int offset) {
CAMLparam0();
CAMLlocal1(ba);
int i;
int nb_samples = Caml_ba_array_val(Field(*in_vector, 0))->dim[0] - offset;

if (nb_samples < 0)
Fail("Invalid offset!");

for (int i = 0; i < swr->in.nb_channels; i++) {
for (i = 0; i < swr->in.nb_channels; i++) {
ba = Field(*in_vector, i);

if (nb_samples != Caml_ba_array_val(ba)->dim[0])
Expand Down

0 comments on commit 91527f5

Please sign in to comment.