0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

vo_gpu_next: don't add 0 width/height sub bitmaps to pl_overlay

Previously, libplacebo would fail to render the image since mpv was
feeding it bogus bitmaps with 0 width/height. An easy way to encounter
this would be to set sub-scale to 0 with bitmap/image subs.
This commit is contained in:
Dudemanguy 2024-02-16 10:02:13 -06:00 committed by sfan5
parent 293532057e
commit c0c32b270e

View File

@ -294,6 +294,8 @@ static void update_overlays(struct vo *vo, struct mp_osd_res res,
entry->num_parts = 0;
for (int i = 0; i < item->num_parts; i++) {
const struct sub_bitmap *b = &item->parts[i];
if (b->dw == 0 || b->dh == 0)
continue;
uint32_t c = b->libass.color;
struct pl_overlay_part part = {
.src = { b->src_x, b->src_y, b->src_x + b->w, b->src_y + b->h },