st/va: fix incorrect use of resource_destroy
Fixes: 4373dd3215
("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>
This commit is contained in:
parent
5aeee1ab15
commit
04298a2f24
|
@ -598,10 +598,8 @@ surface_from_external_memory(VADriverContextP ctx, vlVaSurface *surface,
|
||||||
return VA_STATUS_SUCCESS;
|
return VA_STATUS_SUCCESS;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
for (i = 0; i < VL_NUM_COMPONENTS; i++) {
|
for (i = 0; i < VL_NUM_COMPONENTS; i++)
|
||||||
if (resources[i])
|
pipe_resource_reference(&resources[i], NULL);
|
||||||
pscreen->resource_destroy(pscreen, resources[i]);
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue