0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

vaapi: add missing NULL check

ctx->destroy_native_ctx is guarded, but this early exit was not.
This commit is contained in:
Kacper Michajłow 2023-11-24 00:08:47 +01:00 committed by sfan5
parent 6898d57d98
commit 02aa4f5e28

View File

@ -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;