Skip to content

Commit 04298a2

Browse files
author
Marek Olšák
committed
st/va: fix incorrect use of resource_destroy
Fixes: 4373dd3 ("st/va: Support YUV formats in vaCreateSurfaces") Cc: Drew Davenport <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
1 parent 5aeee1a commit 04298a2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/gallium/state_trackers/va/surface.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,10 +598,8 @@ surface_from_external_memory(VADriverContextP ctx, vlVaSurface *surface,
598598
return VA_STATUS_SUCCESS;
599599

600600
fail:
601-
for (i = 0; i < VL_NUM_COMPONENTS; i++) {
602-
if (resources[i])
603-
pscreen->resource_destroy(pscreen, resources[i]);
604-
}
601+
for (i = 0; i < VL_NUM_COMPONENTS; i++)
602+
pipe_resource_reference(&resources[i], NULL);
605603
return result;
606604
}
607605

0 commit comments

Comments
 (0)