changeset 36371:bbf289ad03f2

vo_vdpau: Initialize variables before, not after setup code. Fixes possible crashes when playing multiple videos without -fixed-vo.
author reimar
date Tue, 15 Oct 2013 18:58:55 +0000
parents 3cc8224f3c6c
children c95bdc49af2e
files libvo/vo_vdpau.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_vdpau.c	Tue Oct 15 18:44:09 2013 +0000
+++ b/libvo/vo_vdpau.c	Tue Oct 15 18:58:55 2013 +0000
@@ -1290,9 +1290,6 @@
         colorspace = 1;
     }
 
-    if (!vo_init() || win_x11_init_vdpau_procs())
-        return -1;
-
     // full grayscale palette.
     for (i = 0; i < PALETTE_SIZE; ++i)
         palette[i] = (i << 16) | (i << 8) | i;
@@ -1309,6 +1306,9 @@
     procamp.saturation = 1.0;
     procamp.hue        = 0.0;
 
+    if (!vo_init() || win_x11_init_vdpau_procs())
+        return -1;
+
     return 0;
 }