summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-22 23:58:40 +0000
committercehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-22 23:58:40 +0000
commit9e8112128e131118464b41acb750282bad526454 (patch)
tree88dbb74ec0ecc2dc255b7d07bcc07bea395ea0e9
parentf0f8ff29b40d36d1a69fa4022403a76b24eec65e (diff)
downloadmpv-9e8112128e131118464b41acb750282bad526454.tar.bz2
mpv-9e8112128e131118464b41acb750282bad526454.tar.xz
Change function call order in config().
This stops creating a window even if hardware decoding is certainly going to fail. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29040 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libvo/vo_vdpau.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c
index 3e7a4b31a8..b7b43cdf25 100644
--- a/libvo/vo_vdpau.c
+++ b/libvo/vo_vdpau.c
@@ -534,6 +534,11 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
#endif
image_format = format;
+ vid_width = width;
+ vid_height = height;
+ free_video_specific();
+ if (IMGFMT_IS_VDPAU(image_format) && !create_vdp_decoder(2))
+ return -1;
int_pause = 0;
visible_buf = 0;
@@ -579,16 +584,9 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
vo_fs = 1;
/* -----VDPAU related code here -------- */
-
- free_video_specific();
-
if (vdp_flip_queue == VDP_INVALID_HANDLE && win_x11_init_vdpau_flip_queue())
return -1;
- // video width and height
- vid_width = width;
- vid_height = height;
-
if (create_vdp_mixer(vdp_chroma_type))
return -1;
@@ -596,9 +594,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
vid_surface_num = -1;
resize();
- if (IMGFMT_IS_VDPAU(image_format) && !create_vdp_decoder(2))
- return -1;
-
return 0;
}