summaryrefslogtreecommitdiffstats
path: root/video/out/vo_lavc.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/vo_lavc.c')
-rw-r--r--video/out/vo_lavc.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/video/out/vo_lavc.c b/video/out/vo_lavc.c
index 8a784db37b..fe5bbcf775 100644
--- a/video/out/vo_lavc.c
+++ b/video/out/vo_lavc.c
@@ -487,16 +487,8 @@ static void draw_osd(struct vo *vo, struct osd_state *osd)
{
struct priv *vc = vo->priv;
- if (vc->lastimg && vc->lastimg_wants_osd) {
- struct aspect_data asp = vo->aspdat;
- double sar = (double)asp.orgw / asp.orgh;
- double dar = (double)asp.prew / asp.preh;
-
- struct mp_osd_res dim = {
- .w = asp.orgw,
- .h = asp.orgh,
- .display_par = sar / dar,
- };
+ if (vc->lastimg && vc->lastimg_wants_osd && vo->params) {
+ struct mp_osd_res dim = osd_res_from_image_params(vo->params);
mp_image_set_colorspace_details(vc->lastimg, &vc->colorspace);