summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-14 22:01:30 +0100
committerwm4 <wm4@nowhere>2014-12-14 22:01:30 +0100
commit06828f71a134e0b880601665c0daea78e6523633 (patch)
tree6ac949f92b291bc2b908cc8bfb1fe81e7ba2ef8a
parent399e2fec6ba70a22e8ab91a1ffb5b60c47778bd8 (diff)
downloadmpv-06828f71a134e0b880601665c0daea78e6523633.tar.bz2
mpv-06828f71a134e0b880601665c0daea78e6523633.tar.xz
vo_x11: don't attempt to resize when unconfigured
Fixes #1347. The previous commit actually fixes the crash.
-rw-r--r--video/out/vo_x11.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c
index 37e9607f0a..419467279f 100644
--- a/video/out/vo_x11.c
+++ b/video/out/vo_x11.c
@@ -620,7 +620,8 @@ static int control(struct vo *vo, uint32_t request, void *data)
case VOCTRL_GET_PANSCAN:
return VO_TRUE;
case VOCTRL_SET_PANSCAN:
- resize(vo);
+ if (vo->config_ok)
+ resize(vo);
return VO_TRUE;
case VOCTRL_REDRAW_FRAME:
draw_image(vo, p->original_image);
@@ -634,7 +635,7 @@ static int control(struct vo *vo, uint32_t request, void *data)
int events = 0;
int r = vo_x11_control(vo, &events, request, data);
- if (events & (VO_EVENT_EXPOSE | VO_EVENT_RESIZE))
+ if (vo->config_ok && (events & (VO_EVENT_EXPOSE | VO_EVENT_RESIZE)))
resize(vo);
vo_event(vo, events);
return r;