diff options
author | Marek Olšák <[email protected]> | 2018-11-02 20:56:42 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-11-05 15:47:50 -0500 |
commit | 04298a2f24455541f28ccffd2f0f73b831833d57 (patch) | |
tree | 78da2ee2ad35b584cab832f46847930c4832f264 | |
parent | 5aeee1ab15f613403874661c7a186074af708928 (diff) |
st/va: fix incorrect use of resource_destroy
Fixes: 4373dd32154 ("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]>
-rw-r--r-- | src/gallium/state_trackers/va/surface.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c index 5376be28531..9646427ea5f 100644 --- a/src/gallium/state_trackers/va/surface.c +++ b/src/gallium/state_trackers/va/surface.c @@ -598,10 +598,8 @@ surface_from_external_memory(VADriverContextP ctx, vlVaSurface *surface, 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; } |