avcodec/vc2enc: Fix slice length

args->bytes here already includes prefix_bytes (see
SSIZE_ROUND macro), so including it here again and
forgetting it when offsetting skip seems wrong.
This only works because prefix_bytes is currently
always zero in this encoder.
(This has been added in b88be742fa
without any reason.)

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
release/7.1
Andreas Rheinhardt 6 months ago
parent eac8dcb187
commit 02ecf8d7f3
  1. 2
      libavcodec/vc2enc.c

@ -788,7 +788,7 @@ static int encode_slices(VC2EncContext *s)
for (slice_y = 0; slice_y < s->num_y; slice_y++) {
for (slice_x = 0; slice_x < s->num_x; slice_x++) {
SliceArgs *args = &enc_args[s->num_x*slice_y + slice_x];
init_put_bits(&args->pb, buf + skip, args->bytes+s->prefix_bytes);
init_put_bits(&args->pb, buf + skip, args->bytes);
skip += args->bytes;
}
}

Loading…
Cancel
Save