Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

video/out/kitty: set display_par when drawing osd #16044

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion video/out/vo_kitty.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ struct priv {
bstr cmd;

int left, top, width, height, cols, rows;
double display_par;

struct mp_rect src;
struct mp_rect dst;
Expand Down Expand Up @@ -175,6 +176,7 @@ static void set_out_params(struct vo *vo)
p->opts.top : p->rows * p->dst.y0 / vo->dheight;
p->left = p->opts.left > 0 ?
p->opts.left : p->cols * p->dst.x0 / vo->dwidth;
p->display_par = p->osd.display_par;

p->buffer_size = 3 * p->width * p->height;
p->output_size = AV_BASE64_SIZE(p->buffer_size);
Expand Down Expand Up @@ -280,7 +282,7 @@ static bool draw_frame(struct vo *vo, struct vo_frame *frame)
mp_image_clear(p->frame, 0, 0, p->width, p->height);
}

struct mp_osd_res res = { .w = p->width, .h = p->height };
struct mp_osd_res res = { .w = p->width, .h = p->height, .display_par = p->display_par };
osd_draw_on_image(vo->osd, res, mpi ? mpi->pts : 0, 0, p->frame);


Expand Down