sub/packer: correctly offset instance bitmap pointer in pack_subrandr
The software scaling code expects this pointer to already be offset by `src_x` and `src_y` but this function copied a pointer only offset by the image offset, forgetting about instance offset.
This commit is contained in:
1 parent
85fe21d290
commit
71ebd08406
1 file changed
+3
-1
+3
-1
@@ -369,7 +369,9 @@ static bool pack_subrandr(struct mp_sub_packer *p, struct sub_bitmaps *res,
|
||||
.w = instance->src_width, .h = instance->src_height,
|
||||
.src_x = image_b->src_x + instance->src_off_x,
|
||||
.src_y = image_b->src_y + instance->src_off_y,
|
||||
.bitmap = image_b->bitmap, .stride = byte_stride,
|
||||
.bitmap = (sbr_bgra8 *)image_b->bitmap
|
||||
+ pixel_stride * instance->src_off_y + instance->src_off_x,
|
||||
.stride = byte_stride,
|
||||
};
|
||||
res->num_parts++;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user