diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-11-24 00:08:47 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-11-26 18:19:11 +0100 |
commit | 02aa4f5e288be0f932f859c7bc0b878b35710cc8 (patch) | |
tree | 092d9dcd189c5d2ee29f98af80fce6b9726c15d8 /video | |
parent | 6898d57d98f1dbe2253585d39a8fa7b57a04d273 (diff) | |
download | mpv-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.c | 3 |
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; |