1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-18 22:06:59 +00:00

vo_x11: don't attempt to resize when unconfigured

Fixes #1347.

The previous commit actually fixes the crash.
This commit is contained in:
wm4 2014-12-14 22:01:30 +01:00 committed by Alessandro Ghedini
parent 015218f8c8
commit 3b6e063599

View File

@ -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;