summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libvo/aspect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libvo/aspect.c b/libvo/aspect.c
index 7b0919748e..dfe1041660 100644
--- a/libvo/aspect.c
+++ b/libvo/aspect.c
@@ -57,6 +57,12 @@ void aspect_save_screenres(struct vo *vo, int scrw, int scrh)
printf("aspect_save_screenres %dx%d \n",scrw,scrh);
#endif
struct MPOpts *opts = vo->opts;
+ if (scrw <= 0 && scrh <= 0)
+ scrw = 1024;
+ if (scrh <= 0)
+ scrh = (scrw * 3 + 3) / 4;
+ if (scrw <= 0)
+ scrw = (scrh * 4 + 2) / 3;
vo->aspdat.scrw = scrw;
vo->aspdat.scrh = scrh;
if (opts->force_monitor_aspect)