summaryrefslogtreecommitdiffstats
path: root/sub/osd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sub/osd.c')
-rw-r--r--sub/osd.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sub/osd.c b/sub/osd.c
index 2d11b80cbb..ba4011c040 100644
--- a/sub/osd.c
+++ b/sub/osd.c
@@ -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,
};
}