Fixes: 4373dd32154 ("st/va: Support YUV formats in vaCreateSurfaces")
Cc: Drew Davenport <ddavenport@chromium.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
return VA_STATUS_SUCCESS;
fail:
- for (i = 0; i < VL_NUM_COMPONENTS; i++) {
- if (resources[i])
- pscreen->resource_destroy(pscreen, resources[i]);
- }
+ for (i = 0; i < VL_NUM_COMPONENTS; i++)
+ pipe_resource_reference(&resources[i], NULL);
return result;
}