diff options
author | Dudemanguy <random342@airmail.cc> | 2024-02-16 10:02:13 -0600 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2024-02-16 22:46:31 +0100 |
commit | c0c32b270e1963e47dd38e102cc9baaf36f585aa (patch) | |
tree | f0a3159b316c0f0f298985e5e81d3ebb5f565183 | |
parent | 293532057ee91a6f52434d6408a836781cfc1573 (diff) | |
download | mpv-c0c32b270e1963e47dd38e102cc9baaf36f585aa.tar.bz2 mpv-c0c32b270e1963e47dd38e102cc9baaf36f585aa.tar.xz |
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.
-rw-r--r-- | video/out/vo_gpu_next.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index a4274a65eb..31b4200779 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -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 }, |