summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-11-24 00:08:47 +0100
committersfan5 <sfan5@live.de>2023-11-26 18:19:11 +0100
commit02aa4f5e288be0f932f859c7bc0b878b35710cc8 (patch)
tree092d9dcd189c5d2ee29f98af80fce6b9726c15d8 /video
parent6898d57d98f1dbe2253585d39a8fa7b57a04d273 (diff)
downloadmpv-02aa4f5e288be0f932f859c7bc0b878b35710cc8.tar.bz2
mpv-02aa4f5e288be0f932f859c7bc0b878b35710cc8.tar.xz
vaapi: add missing NULL check
ctx->destroy_native_ctx is guarded, but this early exit was not.
Diffstat (limited to 'video')
-rw-r--r--video/vaapi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/vaapi.c b/video/vaapi.c
index 2af1be4981..7997da2b2f 100644
--- a/video/vaapi.c
+++ b/video/vaapi.c
@@ -316,7 +316,8 @@ static struct AVBufferRef *va_create_standalone(struct mpv_global *global,
va_initialize(display, log, params->probing);
if (!ctx) {
vaTerminate(display);
- native_displays[n]->destroy(native_ctx);
+ if (native_displays[n]->destroy)
+ native_displays[n]->destroy(native_ctx);
goto end;
}
ctx->native_ctx = native_ctx;