1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-13 10:26:00 +00:00

Sanity check for vo window dimensions, helps avoid division by zero

with -wid.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22148 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2007-02-05 17:47:43 +00:00
parent 5f26168500
commit 3baddb9645

View File

@ -313,6 +313,8 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
XGetGeometry(mDisplay, vo_window, &mRoot,
&drwX, &drwY, &vo_dwidth, &vo_dheight,
&drwBorderWidth, &drwDepth);
if (vo_dwidth <= 0) vo_dwidth = d_width;
if (vo_dheight <= 0) vo_dheight = d_height;
drwX = drwY = 0; // coordinates need to be local to the window
aspect_save_prescale(vo_dwidth, vo_dheight);
} else