diff options
author | wm4 <wm4@nowhere> | 2016-09-07 18:22:36 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-07 18:23:14 +0200 |
commit | 4552ee286b22b12d4e26cc7a948b7b4f59f231dc (patch) | |
tree | 81d6c4b4cb58156c6a2904472e8b7d9bd5df80ef | |
parent | 062423381d0e29d0560d44560019b23dde913bec (diff) | |
download | mpv-4552ee286b22b12d4e26cc7a948b7b4f59f231dc.tar.bz2 mpv-4552ee286b22b12d4e26cc7a948b7b4f59f231dc.tar.xz |
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.
-rw-r--r-- | video/out/opengl/hwdec_vdpau.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |