mirror of https://github.com/mpv-player/mpv
vo_x11: don't attempt to resize when unconfigured
Fixes #1347. The previous commit actually fixes the crash.
This commit is contained in:
parent
399e2fec6b
commit
06828f71a1
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue