1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 14:52:43 +00:00

vdpau: correctly mark invalid mixer as such on vdp_video_mixer_create() failure

Otherwise vdp_video_mixer_destroy() would later fail when called on an invalid
video mixer handle. With mesa r600 vdpau driver, this would cause a segfault.
This commit is contained in:
Alessandro Ghedini 2014-08-13 17:51:07 +02:00
parent 69d5356d76
commit 2607d6e419

View File

@ -170,6 +170,9 @@ static int create_vdp_mixer(struct mp_vdpau_mixer *mixer)
VDP_NUM_MIXER_PARAMETER,
parameters, parameter_values,
&mixer->video_mixer);
if (vdp_st != VDP_STATUS_OK)
mixer->video_mixer = VDP_INVALID_HANDLE;
CHECK_VDP_ERROR(mixer, "Error when calling vdp_video_mixer_create");
mixer->initialized = true;