diff options
author | wm4 <wm4@nowhere> | 2014-12-14 22:01:30 +0100 |
---|---|---|
committer | Alessandro Ghedini <alessandro@ghedini.me> | 2014-12-17 20:12:06 +0100 |
commit | 3b6e063599f808ef5000a4d4e094d76c338b8de8 (patch) | |
tree | ab44567617ea8c5535adb48485573bbdd8fca435 | |
parent | 015218f8c8aa9933928732b680e456ecc04f4800 (diff) | |
download | mpv-3b6e063599f808ef5000a4d4e094d76c338b8de8.tar.bz2 mpv-3b6e063599f808ef5000a4d4e094d76c338b8de8.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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c index 6eda4df131..40adb33ac0 100644 --- a/video/out/vo_x11.c +++ b/video/out/vo_x11.c @@ -622,7 +622,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); @@ -636,7 +637,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; |