diff options
Diffstat (limited to 'sub/osd.c')
-rw-r--r-- | sub/osd.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -388,13 +388,10 @@ void osd_draw_on_image_p(struct osd_state *osd, struct mp_osd_res res, // ratio if the image does not have a 1:1 pixel aspect ratio. struct mp_osd_res osd_res_from_image_params(const struct mp_image_params *p) { - double sar = (double)p->w / p->h; - double dar = (double)p->d_w / p->d_h; - return (struct mp_osd_res) { .w = p->w, .h = p->h, - .display_par = sar / dar, + .display_par = p->p_h / (double)p->p_w, }; } |