vo_vdpau: skip resize code if not fully initialized

Window events or user commands could trigger a call to resize() before
config() had been called. This caused at least error messages. Add a
check to make resize() exit without doing anything in this case. It
will be called again later when the output is configured.
This commit is contained in:
Uoti Urpala 2011-07-17 05:52:36 +03:00
parent c3e46833c2
commit decec7f2a3
1 changed files with 5 additions and 0 deletions

View File

@ -371,6 +371,10 @@ static void resize(struct vo *vo)
struct vdp_functions *vdp = vc->vdp;
VdpStatus vdp_st;
int i;
if (!vo->config_ok || vc->is_preempted)
return;
struct vo_rect src_rect;
struct vo_rect dst_rect;
struct vo_rect borders;
@ -931,6 +935,7 @@ static int config(struct vo *vo, uint32_t width, uint32_t height,
if ((flags & VOFLAG_FULLSCREEN) && WinID <= 0)
vo_fs = 1;
vo->config_ok = true; // set temporarily as resize() checks it below
if (initialize_vdpau_objects(vo) < 0)
return -1;