summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sub/osd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sub/osd.c b/sub/osd.c
index f02693e921..b06fd242a3 100644
--- a/sub/osd.c
+++ b/sub/osd.c
@@ -506,8 +506,10 @@ void osd_rescale_bitmaps(struct sub_bitmaps *imgs, int frame_w, int frame_h,
int vidh = res.h - res.mt - res.mb;
double xscale = (double)vidw / frame_w;
double yscale = (double)vidh / frame_h;
- if (compensate_par < 0)
+ if (compensate_par < 0) {
+ assert(res.display_par);
compensate_par = xscale / yscale / res.display_par;
+ }
if (compensate_par > 0)
xscale /= compensate_par;
int cx = vidw / 2 - (int)(frame_w * xscale) / 2;