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
parent 399e2fec6b
commit 06828f71a1
1 changed files with 3 additions and 2 deletions

View File

@ -620,6 +620,7 @@ static int control(struct vo *vo, uint32_t request, void *data)
case VOCTRL_GET_PANSCAN:
return VO_TRUE;
case VOCTRL_SET_PANSCAN:
if (vo->config_ok)
resize(vo);
return VO_TRUE;
case VOCTRL_REDRAW_FRAME:
@ -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;