Skip to content

Commit

Permalink
Also fix input.
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Oct 19, 2024
1 parent 798be45 commit 5300f5c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions swscale/swscale_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,14 @@ static int get_in_pixels_string(sws_t *sws, value *in_vector) {

static int get_in_pixels_ba(sws_t *sws, value *in_vector) {
CAMLparam0();
CAMLlocal1(v);
int i, nb_planes = Wosize_val(*in_vector);
CAMLlocal2(planes, v);
int i, nb_planes;

planes = Field(*in_vector, 1);
nb_planes = Wosize_val(planes);

for (i = 0; i < nb_planes && i < 4; i++) {
v = Field(*in_vector, i);
v = Field(planes, i);
sws->in.slice[i] = Caml_ba_data_val(Field(v, 0));
sws->in.stride[i] = Int_val(Field(v, 1));
}
Expand Down

0 comments on commit 5300f5c

Please sign in to comment.