mirror of
https://github.com/mpv-player/mpv
synced 2025-01-24 19:37:30 +01:00
vo_vdpau: fix crash when vo_vdpau initialization fails
This happened on system without a vdpau driver installed. It's especially bad because vdpau is the default VO. I'm not sure when this bug was introduced, and it seems to exist in upstream mplayer2 too.
This commit is contained in:
parent
1b7b0c93a8
commit
4672ff39dd
@ -1505,7 +1505,7 @@ static int preinit(struct vo *vo, const char *arg)
|
||||
// After this calling uninit() should work to free resources
|
||||
|
||||
if (win_x11_init_vdpau_procs(vo) < 0) {
|
||||
if (vc->vdp->device_destroy)
|
||||
if (vc->vdp && vc->vdp->device_destroy)
|
||||
vc->vdp->device_destroy(vc->vdp_device);
|
||||
vo_x11_uninit(vo);
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user