From decec7f2a37e559d6a05a01e8c916908c13d5dcb Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sun, 17 Jul 2011 05:52:36 +0300 Subject: 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. --- libvo/vo_vdpau.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libvo') diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c index f9710b7a1e..6fb32b442b 100644 --- a/libvo/vo_vdpau.c +++ b/libvo/vo_vdpau.c @@ -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; -- cgit v1.2.3