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 19:16:53 +02:00
parent 6310bd60e6
commit e33df9b7bc
+3
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;