mirror of https://github.com/mpv-player/mpv
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:
parent
062423381d
commit
4552ee286b
|
@ -210,7 +210,8 @@ static int map_frame(struct gl_hwdec *hw, struct mp_image *hw_image,
|
||||||
mark_vdpau_objects_uninitialized(hw);
|
mark_vdpau_objects_uninitialized(hw);
|
||||||
if (pe < 0)
|
if (pe < 0)
|
||||||
return -1;
|
return -1;
|
||||||
if (reinit(hw, &p->image_params) < 0)
|
struct mp_image_params params = p->image_params;
|
||||||
|
if (reinit(hw, ¶ms) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue