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.
This commit is contained in:
wm4 2016-09-07 18:22:36 +02:00
parent 062423381d
commit 4552ee286b
1 changed files with 2 additions and 1 deletions

View File

@ -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, &params) < 0)
return -1;
}