From 4552ee286b22b12d4e26cc7a948b7b4f59f231dc Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 7 Sep 2016 18:22:36 +0200 Subject: vo_opengl: fix another potential vdpau preemption issue reinit() will change the image params fields, so give it a copy. Will fix potential crashes if preemption happens more than once. --- video/out/opengl/hwdec_vdpau.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'video') diff --git a/video/out/opengl/hwdec_vdpau.c b/video/out/opengl/hwdec_vdpau.c index f9d101c636..06dc71e5e9 100644 --- a/video/out/opengl/hwdec_vdpau.c +++ b/video/out/opengl/hwdec_vdpau.c @@ -210,7 +210,8 @@ static int map_frame(struct gl_hwdec *hw, struct mp_image *hw_image, mark_vdpau_objects_uninitialized(hw); if (pe < 0) return -1; - if (reinit(hw, &p->image_params) < 0) + struct mp_image_params params = p->image_params; + if (reinit(hw, ¶ms) < 0) return -1; } -- cgit v1.2.3