summaryrefslogtreecommitdiffstats
path: root/libvo/vo_xv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/vo_xv.c')
-rw-r--r--libvo/vo_xv.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index df9bb69aa1..65581dac35 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -595,9 +595,13 @@ static int preinit(struct vo *vo, const char *arg)
strarg_t ck_method_arg = { 0, NULL };
struct xvctx *ctx = talloc_zero(vo, struct xvctx);
vo->priv = ctx;
- struct vo_x11_state *x11 = vo->x11;
int xv_adaptor = -1;
+ if (!vo_init(vo))
+ return -1;
+
+ struct vo_x11_state *x11 = vo->x11;
+
const opt_t subopts[] =
{
/* name arg type arg var test */
@@ -618,9 +622,6 @@ static int preinit(struct vo *vo, const char *arg)
/* modify colorkey settings according to the given options */
xv_setup_colorkeyhandling(vo, ck_method_arg.str, ck_src_arg.str);
- if (!vo_init(vo))
- return -1;
-
/* check for Xvideo extension */
unsigned int ver, rel, req, ev, err;
if (Success != XvQueryExtension(x11->display, &ver, &rel, &req, &ev, &err)) {