summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-11-23 20:39:15 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-11-23 20:39:15 +0000
commitb704defedd9b6a24bb6dd0102d14d686c6d26dff (patch)
treea91f4658e05bb7d9af13e0bdda30ed8c3a069109 /libvo
parentaf80fe7f1259a6040cf50083141e00bd58d9eabd (diff)
downloadmpv-b704defedd9b6a24bb6dd0102d14d686c6d26dff.tar.bz2
mpv-b704defedd9b6a24bb6dd0102d14d686c6d26dff.tar.xz
Do not draw in window if our image has not yet been adjusted to the new window size.
Fixes some cases of borders not being black in fullscreen when fullscreen image is scaled down. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28009 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_x11.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index f1bdb4d764..f05260bd2e 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -468,6 +468,11 @@ static void Display_Image(XImage * myximage, uint8_t * ImageData)
{
int x = (vo_dwidth - dst_width) / 2;
int y = (vo_dheight - myximage->height) / 2;
+
+ // do not draw if the image needs rescaling
+ if ((old_vo_dwidth != vo_dwidth || old_vo_dheight != vo_dheight) && zoomFlag)
+ return;
+
if (WinID == 0) {
x = vo_dx;
y = vo_dy;