1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-09 14:14:39 +02:00

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 b88be742fac7a77a8095e8155ba8790db4b77568
without any reason.)

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-05-25 20:32:42 +02:00
parent eac8dcb187
commit 02ecf8d7f3

View File

@ -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;
}
}