summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-01-19 13:08:24 +0100
committerAnton Khirnov <anton@khirnov.net>2022-01-21 09:44:01 +0100
commit137c808f1aaf2b5641b0e7319f35bd9dd7866e6f (patch)
treeae1bc3d6cb380172555977e02c70b9088c41d9b1
parent2f0a214a6202516b4dda2bb22b6b3ac20e465d6d (diff)
lavu/hwcontext_vulkan: clear dangling pointers on map failure
-rw-r--r--libavutil/hwcontext_vulkan.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 60a6cf6a91..ae19fc2ab6 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2927,6 +2927,7 @@ static int vulkan_map_from_drm(AVHWFramesContext *hwfc, AVFrame *dst,
fail:
vulkan_frame_free(hwfc->device_ctx->hwctx, (uint8_t *)f);
+ dst->data[0] = NULL;
return err;
}